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:
2025-10-06 13:32:35 +02:00
parent 6d0c3fdf26
commit 57d49bcf78
7 changed files with 90 additions and 52 deletions

View File

@@ -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');