minor fixes

This commit is contained in:
asyncnomi 2023-01-03 20:15:40 +01:00
parent 1e6c1adc38
commit ae1f8029d8

View file

@ -38,7 +38,11 @@ $("#login-button").click(function (e) {
localStorage.setItem("token", data.token);
localStorage.setItem("user", data.user.uid);
localStorage.setItem("isAdmin", data.user.isAdmin);
show_page('#demande-page');
if (data.user.isAdmin) {
show_page('#admin-page');
} else {
show_page('#demande-page');
}
} else {
alert(data.why);
}