Fix a little bug v0.0.2
This commit is contained in:
parent
cb7d17a47e
commit
e3377b874e
@ -54,6 +54,10 @@ const validateUser = async (parsedJson) => {
|
||||
// save a cookie
|
||||
const cookieText = `token=${token},type=${type},expires_days=${expiresInDays}`;
|
||||
setCookie(token, type, expiresInDays);
|
||||
|
||||
|
||||
// return to home. at a later point set it to the user page
|
||||
window.location.href = '/';
|
||||
}));
|
||||
} else if (parsedJson.detail == "Invalid password") {
|
||||
setTooltip("error", "Invalid password");
|
||||
@ -86,7 +90,7 @@ const getCookie = (returnType) => {
|
||||
if (decodedCookie == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let ca = decodedCookie.split(',');
|
||||
|
||||
const token = ca[0].split("token=")[1];
|
||||
|
Loading…
Reference in New Issue
Block a user