diff --git a/server/backend/internal/httpapi/manage/auth.go b/server/backend/internal/httpapi/manage/auth.go index 2c4736d..0d4828d 100644 --- a/server/backend/internal/httpapi/manage/auth.go +++ b/server/backend/internal/httpapi/manage/auth.go @@ -37,7 +37,7 @@ func HandleLoginUI(authStore *store.AuthStore, cfg config.Config) http.HandlerFu if u.Role == "admin" { http.Redirect(w, r, "/admin", http.StatusSeeOther) } else if u.TenantSlug != "" { - http.Redirect(w, r, "/manage/"+u.TenantSlug, http.StatusSeeOther) + http.Redirect(w, r, "/tenant/"+u.TenantSlug+"/dashboard", http.StatusSeeOther) } else { http.Redirect(w, r, "/admin", http.StatusSeeOther) } @@ -122,12 +122,12 @@ func HandleLoginPost(authStore *store.AuthStore, cfg config.Config) http.Handler } switch user.Role { case "admin": - http.Redirect(w, r, "/admin", http.StatusSeeOther) + http.Redirect(w, r, "/manage/", http.StatusSeeOther) default: if user.TenantSlug != "" { - http.Redirect(w, r, "/manage/"+user.TenantSlug, http.StatusSeeOther) + http.Redirect(w, r, "/tenant/"+user.TenantSlug+"/dashboard", http.StatusSeeOther) } else { - http.Redirect(w, r, "/admin", http.StatusSeeOther) + http.Redirect(w, r, "/manage/", http.StatusSeeOther) } } }