redir to home on login
This commit is contained in:
parent
28589f8a7b
commit
1a6b3d7190
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ dom("submit").addEventListener("click", function() {
|
||||||
if (json.valid) {
|
if (json.valid) {
|
||||||
setCookie("token", json.token);
|
setCookie("token", json.token);
|
||||||
localStorage.setItem("token", json.token);
|
localStorage.setItem("token", json.token);
|
||||||
window.location.href = "/editor";
|
window.location.href = "/home";
|
||||||
} else {
|
} else {
|
||||||
dom("submit").removeAttribute("disabled");
|
dom("submit").removeAttribute("disabled");
|
||||||
showlog(`Unable to login! Reason: ${json.reason}`);
|
showlog(`Unable to login! Reason: ${json.reason}`);
|
||||||
|
|
|
@ -38,7 +38,7 @@ dom("submit").addEventListener("click", function() {
|
||||||
if (json.valid) {
|
if (json.valid) {
|
||||||
setCookie("token", json.token);
|
setCookie("token", json.token);
|
||||||
localStorage.setItem("token", json.token);
|
localStorage.setItem("token", json.token);
|
||||||
window.location.href = "/editor";
|
window.location.href = "/home";
|
||||||
} else {
|
} else {
|
||||||
dom("submit").removeAttribute("disabled");
|
dom("submit").removeAttribute("disabled");
|
||||||
showlog(`Unable to create account! Reason: ${json.reason}`);
|
showlog(`Unable to create account! Reason: ${json.reason}`);
|
||||||
|
|
Loading…
Reference in a new issue