MCPcopy Create free account
hub / github.com/alephdata/aleph / parse_request

Function parse_request

aleph/views/util.py:49–55  ·  view source on GitHub ↗

Get request form data or body and validate it against a schema.

(schema)

Source from the content-addressed store, hash-verified

47
48
49def parse_request(schema):
50 """Get request form data or body and validate it against a schema."""
51 if request.is_json:
52 data = request.get_json()
53 else:
54 data = request.form.to_dict(flat=True)
55 return validate(data, schema)
56
57
58def validate(data, schema):

Callers 15

createFunction · 0.90
updateFunction · 0.90
createFunction · 0.90
updateFunction · 0.90
entities_updateFunction · 0.90
item_updateFunction · 0.90
createFunction · 0.90
password_loginFunction · 0.90
create_codeFunction · 0.90
createFunction · 0.90
updateFunction · 0.90
pairwiseFunction · 0.90

Calls 2

validateFunction · 0.70
to_dictMethod · 0.45

Tested by

no test coverage detected