Spaces:
Sleeping
Sleeping
Update templates/register.html
Browse files- templates/register.html +3 -2
templates/register.html
CHANGED
@@ -85,9 +85,10 @@
|
|
85 |
|
86 |
if (result.success) {
|
87 |
showAlert('Account created successfully! Redirecting...', 'success');
|
|
|
88 |
setTimeout(() => {
|
89 |
-
window.location.href = '/chat';
|
90 |
-
},
|
91 |
} else {
|
92 |
showAlert(result.message || 'Registration failed', 'danger');
|
93 |
}
|
|
|
85 |
|
86 |
if (result.success) {
|
87 |
showAlert('Account created successfully! Redirecting...', 'success');
|
88 |
+
// Use the redirect URL from the server response
|
89 |
setTimeout(() => {
|
90 |
+
window.location.href = result.redirect || '/chat';
|
91 |
+
}, 1000);
|
92 |
} else {
|
93 |
showAlert(result.message || 'Registration failed', 'danger');
|
94 |
}
|