add already encoded seed id to api answer

This commit is contained in:
Fabian Dill 2020-10-28 19:36:51 +01:00
parent b1fe3d3e7b
commit 1afdd473ca
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ def generate_api():
owner=session["_id"]) owner=session["_id"])
commit() commit()
return {"text" : f"Generation of seed {gen.id} started succesfully.", return {"text" : f"Generation of seed {gen.id} started succesfully.",
"detail": gen.id}, 201 "detail": gen.id,
"encoded": app.url_map.converters["suuid"].to_url(gen.id)}, 201
else: else:
return {"text": "POST data empty or incorrectly headered."}, 400 return {"text": "POST data empty or incorrectly headered."}, 400
except Exception as e: except Exception as e: