1 Commits

Author SHA1 Message Date
static
f059f0d7c4 tRPC Endpoint를 /api/trpc로 변경 2025-12-25 20:13:44 +09:00
3 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ import { authenticate, AuthenticationError } from "$lib/server/modules/auth";
export const authenticateMiddleware: Handle = async ({ event, resolve }) => {
const { pathname, search } = event.url;
if (pathname === "/api/auth/login" || pathname.startsWith("/trpc")) {
if (pathname === "/api/auth/login" || pathname.startsWith("/api/trpc")) {
return await resolve(event);
}

View File

@@ -5,7 +5,7 @@ import type { RequestHandler } from "./$types";
const trpcHandler: RequestHandler = (event) =>
fetchRequestHandler({
endpoint: "/trpc",
endpoint: "/api/trpc",
req: event.request,
router: appRouter,
createContext: () => createContext(event),

View File

@@ -6,7 +6,7 @@ const createClient = (fetch: typeof globalThis.fetch) =>
createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: "/trpc",
url: "/api/trpc",
fetch,
}),
],