chore: move /api to /api/web

This commit is contained in:
Michael Zetterberg
2024-04-16 10:41:54 +02:00
parent bc381ea65f
commit 41c29efd82
7 changed files with 17 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"
import { appRouter } from "@/server"
import { createContext } from "@/server/context"
async function handler(req: Request) {
return fetchRequestHandler({
createContext,
endpoint: "/api/web/trpc",
req,
router: appRouter,
})
}
export { handler as GET, handler as POST }