fix: redirect to /workspaces after login (instead of /)
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- Local login JS: window.location='/workspaces' instead of '/'
- Root route /: if no workspace exists, redirect to /workspaces
- Existing users with workspaces: still go to /local-workspace
This commit is contained in:
2026-07-15 07:41:22 -04:00
parent bf19af2347
commit aedb07c962
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -369,6 +369,16 @@ async def dashboard(
except Exception:
pass
if not has_gitea:
# Check if user has any workspace — if not, send to workspaces
try:
with get_conn() as conn:
ws_count = conn.execute(
"SELECT COUNT(*) FROM workspaces WHERE owner_id=?", (user_id,)
).fetchone()[0]
if ws_count == 0:
return RedirectResponse("/workspaces", status_code=302)
except Exception:
pass
return RedirectResponse("/local-workspace", status_code=302)
try:
repos = await gitea.get_user_repos(page=1, limit=50)