Forgot this one as well

This commit is contained in:
augustin64 2023-10-26 14:35:09 +02:00
parent 83b033a779
commit 34cae34236

View File

@ -207,7 +207,13 @@ def create_album(groupe_uuid):
except db.IntegrityError:
pass
return redirect(f"/groupe/{groupe.uuid}/{uuid}")
if "response" in request.args and request.args["response"] == "json":
return {
"status": "ok",
"uuid": uuid
}
else:
return redirect(f"/groupe/{groupe.uuid}/{uuid}")
flash(error)
return redirect(request.referrer)