mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-08 07:17:27 +08:00
[F] Fix login redirect logic
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
.catch(e => verifyMsg = `Email verification failed: ${e.message}`)
|
.catch(e => verifyMsg = `Email verification failed: ${e.message}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submit() {
|
async function submit(): Promise<any> {
|
||||||
submitting = true
|
submitting = true
|
||||||
|
|
||||||
// Check if username and password are valid
|
// Check if username and password are valid
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Send request to server
|
// Send request to server
|
||||||
await USER.login({ email, password, turnstile })
|
await USER.login({ email, password, turnstile }).then(() => window.location.href = "/home")
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
if (e.message === 'Email not verified - STATE_0') {
|
if (e.message === 'Email not verified - STATE_0') {
|
||||||
state = 'verify'
|
state = 'verify'
|
||||||
@@ -90,9 +90,6 @@
|
|||||||
submitting = false
|
submitting = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Redirect to portal page /home
|
|
||||||
window.location.href = "/home"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
submitting = false
|
submitting = false
|
||||||
|
|||||||
Reference in New Issue
Block a user