mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
Compare commits
1 Commits
3fc29cf8db
...
f059f0d7c4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f059f0d7c4 |
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
@@ -6,7 +6,7 @@ const createClient = (fetch: typeof globalThis.fetch) =>
|
||||
createTRPCClient<AppRouter>({
|
||||
links: [
|
||||
httpBatchLink({
|
||||
url: "/trpc",
|
||||
url: "/api/trpc",
|
||||
fetch,
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user