From ff636bc355fa31df3bdb39ff0035a66612c5bf89 Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Tue, 3 Jan 2023 20:20:27 +0100 Subject: [PATCH] same --- static/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/main.js b/static/js/main.js index 3f9738d..a3a455c 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -40,6 +40,7 @@ $("#login-button").click(function (e) { localStorage.setItem("isAdmin", data.user.isAdmin); if (data.user.isAdmin) { show_page('#admin-page'); + get_admin("prank"); } else { show_page('#demande-page'); } @@ -91,7 +92,7 @@ function get_admin(type) { $("#admin-content").innerHTML = ""; $.ajax({ type: "POST", - url: base_url + "login", + url: base_url + "get", data: JSON.stringify({ uid: localStorage.getItem('user'), token: localStorage.getItem('token'),