mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-12 19:22:21 -04:00
catch no bulk post body
This commit is contained in:
parent
5d1e6b3235
commit
2ba8d74fa7
2 changed files with 10 additions and 0 deletions
|
@ -106,6 +106,8 @@ class APIBulkDownloadCreator(Resource):
|
|||
def post(self):
|
||||
utils.check_upload_folder(current_app.config['UPLOAD_FOLDER'])
|
||||
data = request.json
|
||||
if not data:
|
||||
abort(400, message="Post Body Required")
|
||||
if not self.v.validate(data):
|
||||
abort(400, message=self.v.errors)
|
||||
# prevent the zip file from being overwritten
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue