fix for ship logical delete server-side

This commit is contained in:
Daniel Schick 2024-04-12 08:40:36 +02:00
parent 8e8f9d6d3e
commit 921062e38b

View File

@ -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)