added password check for DELETE method #7
@ -54,7 +54,7 @@ def create_app():
|
||||
@app.route('/presentation/<string:presentation>', methods=['DELETE'])
|
||||
def delete_presentation(presentation):
|
||||
data = request.get_json()
|
||||
if not data['auth'] or not _valid_credential(data['auth']):
|
||||
if not 'auth' in data or not _valid_credential(data['auth']):
|
||||
return Response(response="Use correct credentials to access this endpoint", status=401)
|
||||
|
||||
shutil.rmtree(os.path.join(storagedir, presentation))
|
||||
|
Loading…
x
Reference in New Issue
Block a user