frontend: add Create-profile setup screen for brand-new accounts
LoginGate now shows CreateProfile (display name only) instead of App when an authenticated session has no provisioned geniusrun profile yet, backed by the new POST /api/setup endpoint and session/me's has_profile flag.
This commit is contained in:
@@ -46,6 +46,11 @@ export const api = {
|
||||
// browser navigation. Logout must POST (see server.go's route), which an
|
||||
// <a href> can't do, hence the form.
|
||||
getSessionInfo: () => request<SessionInfo>("/api/session/me"),
|
||||
setup: (displayName: string) =>
|
||||
request<{ user_id: number; display_name: string }>("/api/setup", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ display_name: displayName }),
|
||||
}),
|
||||
|
||||
// Auth
|
||||
login: () => request<AuthResponse>("/api/auth/login", { method: "POST" }),
|
||||
|
||||
Reference in New Issue
Block a user