fix for ship logical delete server-side
This commit is contained in:
parent
1a3146cf85
commit
3455139c74
@ -53,12 +53,16 @@ def PutShip():
|
||||
@auth_guard() # no restriction by role
|
||||
def DeleteShip():
|
||||
|
||||
# TODO check if I am allowed to delete this thing by deriving the participant from the bearer token
|
||||
try:
|
||||
content = request.get_json(force=True)
|
||||
loadedModel = model.ShipSchema().load(data=content, many=False, partial=True, unknown=EXCLUDE)
|
||||
if 'id' in request.args:
|
||||
options = {}
|
||||
options["id"] = request.args.get("id")
|
||||
else:
|
||||
return json.dumps("no id provided"), 400
|
||||
except Exception as ex:
|
||||
logging.error(ex)
|
||||
print(ex)
|
||||
return json.dumps("bad format"), 400
|
||||
|
||||
return impl.ships.DeleteShip(loadedModel)
|
||||
return impl.ships.DeleteShip(options)
|
||||
|
||||
Reference in New Issue
Block a user