abdullahalioo commited on
Commit
0448f45
·
verified ·
1 Parent(s): a1ffe94

Update templates/register.html

Browse files
Files changed (1) hide show
  1. 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
- }, 2000);
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
  }