From abe09e38fb5dc5ede5abe715520c3e4006c66894 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 20 Jun 2026 00:43:10 +0900 Subject: 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 --- app/routes.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'app/routes.ts') 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"), -- cgit v1.2.3