move trpc to api

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-23 08:21:15 +02:00
parent 8207f15a83
commit ec8bf02fb9
37 changed files with 497 additions and 156 deletions

View File

@@ -35,7 +35,15 @@ function AllProviders({ children }: { children: React.ReactNode }) {
transformer: superjson,
links: [
httpLink({
url: `${process.env.NEXT_PUBLIC_DASHBOARD_URL}/api/trpc`,
url: `${process.env.NEXT_PUBLIC_API_URL}/trpc`,
fetch(url, options) {
// Send cookies
return fetch(url, {
...options,
credentials: 'include',
mode: 'cors',
});
},
}),
],
})