diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-20 00:43:10 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-20 00:43:10 +0900 |
| commit | abe09e38fb5dc5ede5abe715520c3e4006c66894 (patch) | |
| tree | 2a4dd09ca16d9f82f3b50aa9bd9fb029f5f5f0f1 /app/routes.ts | |
| parent | 3ec8bce7073bd922096681348fa86b6e8ff9b0d1 (diff) | |
Fix: move passkey API to dedicated route without React component
React Router v7 treats POST to routes with a default export as document
requests and returns HTML instead of the action's JSON response. Moving
the API logic to an action-only route (/api/passkey) fixes this.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/routes.ts')
| -rw-r--r-- | app/routes.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/routes.ts b/app/routes.ts index 8ca1209..f4577e5 100644 --- a/app/routes.ts +++ b/app/routes.ts @@ -3,6 +3,7 @@ import { type RouteConfig, index, route } from "@react-router/dev/routes"; export default [ index("routes/home.tsx"), route("/api/posts", "routes/api.posts.tsx"), + route("/api/passkey", "routes/api.passkey.tsx"), route("/auth/register", "routes/auth.register.tsx"), route("/auth/login", "routes/auth.login.tsx"), route("/auth/logout", "routes/auth.logout.tsx"), |
