fix(DevWeb): Login redirection and create session for the logged user

This commit is contained in:
Lucàs
2024-03-21 00:14:57 +01:00
parent 9e5a7f89bd
commit 5f336ff761
2 changed files with 15 additions and 10 deletions
@@ -17,7 +17,7 @@ loginForm.addEventListener("submit", (event) => {
.then(res => res.json())
.then(data => {
console.log(data);
if (data.status === 200 && data.nextUrl) window.location.href = data.nextUrl;
if (data.status === 200) window.location.href = data.redirect;
})
.catch(error => console.error("Error:", error))
;