add logout button to admin panel
This commit is contained in:
parent
6a78cca00b
commit
a778756f3c
@ -19,6 +19,11 @@ def auth():
|
||||
else:
|
||||
return flask.redirect("/admin/auth?failed=1")
|
||||
|
||||
@routes_api_admin.route("/logout", methods=["GET", "POST"])
|
||||
def logout():
|
||||
flask.session.pop("admin", None)
|
||||
return flask.redirect("/")
|
||||
|
||||
@routes_api_admin.route("/setQuestions", methods=["GET", "POST"])
|
||||
@require_admin(api=True)
|
||||
def set_questions():
|
||||
@ -170,4 +175,4 @@ def delete_npc():
|
||||
input_npc_id = flask.request.json["npc_id"]
|
||||
db.session.execute(delete(Npc).where(Npc.NPC_ID==input_npc_id))
|
||||
db.session.commit()
|
||||
return {}
|
||||
return {}
|
||||
|
@ -20,6 +20,8 @@
|
||||
{%endfor%}
|
||||
<br>
|
||||
<a href="/admin/npc/new"> Nouveau NPC </a>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<a href="/api/v1/admin/logout"> Logout </a>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user