diff --git a/apps/gateway/src/main.rs b/apps/gateway/src/main.rs index 3433561..1c66dde 100644 --- a/apps/gateway/src/main.rs +++ b/apps/gateway/src/main.rs @@ -84,6 +84,7 @@ impl Services { // Auth, users, roles, notifications, runtime-config, config, KB, support if path.starts_with("/api/auth") || path.starts_with("/api/users") + || path.starts_with("/api/v1/users") || path.starts_with("/api/me") || path.starts_with("/api/profile") || path.starts_with("/api/onboarding") diff --git a/apps/users/src/handlers/auth.rs b/apps/users/src/handlers/auth.rs index a6c30e0..7ac3850 100644 --- a/apps/users/src/handlers/auth.rs +++ b/apps/users/src/handlers/auth.rs @@ -724,3 +724,10 @@ async fn switch_role( "expires_in": 900 })))) } + +// ── V1 API Router (for backward compatibility) ───────────────────────── + +pub fn v1_router() -> Router { + Router::new() + .route("/resend-otp", post(resend_otp)) +} diff --git a/apps/users/src/main.rs b/apps/users/src/main.rs index f8873db..6f76b66 100644 --- a/apps/users/src/main.rs +++ b/apps/users/src/main.rs @@ -54,6 +54,8 @@ async fn main() { let app = Router::new() // ── Auth ───────────────────────────────────────────────────────── .nest("/api/auth", handlers::auth::router()) + // ── V1 API (backward compatibility) ─────────────────────────────── + .nest("/api/v1/users", handlers::auth::v1_router()) // ── Roles & User Self-Service ───────────────────────────────────── .nest("/api/admin/roles", handlers::roles::router()) .nest("/api/admin/permissions", handlers::permissions::router())