Fix setup to login redirect issue
- Fix setup.html to use redirect_url from API response instead of hardcoded '/' - Add database creation (aniworld.db, cache.db) during setup process - Setup now properly creates all required files for validation - After setup completion, users are correctly redirected to /login - Tested: setup API returns correct redirect_url, database files created, redirect works
This commit is contained in:
@@ -513,7 +513,9 @@
|
||||
if (data.status === 'success') {
|
||||
showMessage('Setup completed successfully! Redirecting...', 'success');
|
||||
setTimeout(() => {
|
||||
window.location.href = '/';
|
||||
// Use redirect_url from API response, fallback to /login
|
||||
const redirectUrl = data.redirect_url || '/login';
|
||||
window.location.href = redirectUrl;
|
||||
}, 2000);
|
||||
} else {
|
||||
showMessage(data.message, 'error');
|
||||
|
||||
Reference in New Issue
Block a user