GET /auth/status returns { has_profile: true/false } without erroring,
so the dashboard can check on load whether an onboarding flow is needed.
POST /auth/reset wipes every user-data table (profiles, clubs, owned_cards,
packs, squads, matches, statistics, achievements, notifications, seasons,
market_listings, sbc_submissions, draft_sessions, fut_champs_sessions,
objective_progress, position_goals, events, settings) in reverse-dependency
order, leaving the schema intact. A fresh POST /auth/local creates a new
club on the clean slate.
4 new tests: status before/after profile creation, reset clears profile
and allows a new one. Core now at 86 tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,8 @@ pub async fn build(pool: Pool, cfg: Config) -> Result<Router> {
|
||||
.route("/health", get(routes::health::get_health))
|
||||
.route("/formations", get(routes::health::get_formations))
|
||||
.route("/auth/local", post(routes::auth::post_auth_local))
|
||||
.route("/auth/status", get(routes::auth::get_auth_status))
|
||||
.route("/auth/reset", post(routes::auth::post_auth_reset))
|
||||
.route("/profile", get(routes::profile::get_profile))
|
||||
.route("/club", get(routes::club::get_club))
|
||||
.route("/club", put(routes::club::put_club))
|
||||
|
||||
Reference in New Issue
Block a user