minor fixes
This commit is contained in:
parent
1e6c1adc38
commit
ae1f8029d8
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue