We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a328b1 + 124c2f1 commit 8a55224Copy full SHA for 8a55224
src/opengeodeweb_back/geode_functions.py
@@ -234,14 +234,15 @@ def extension_from_filename(filename):
234
return os.path.splitext(filename)[1][1:]
235
236
237
-def form_variables(form, variables_array):
238
- variables_dict = {}
+def validate_request(request, variables_array):
+ json_data = request.get_json(force=True, silent=True)
239
+
240
+ if json_data is None:
241
+ flask.abort(400, f"No json sent")
242
243
for variable in variables_array:
- if form.get(variable) is None:
244
+ if variable not in json_data.keys():
245
flask.abort(400, f"No {variable} sent")
- else:
- variables_dict[variable] = form.get(variable)
- return variables_dict
246
247
248
def geographic_coordinate_systems(geode_object: str):
0 commit comments