-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tRPC, use it for group expense list
- Loading branch information
Showing
14 changed files
with
419 additions
and
141 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { createTRPCContext } from '@/trpc/init' | ||
import { appRouter } from '@/trpc/routers/_app' | ||
import { fetchRequestHandler } from '@trpc/server/adapters/fetch' | ||
|
||
const handler = (req: Request) => | ||
fetchRequestHandler({ | ||
endpoint: '/api/trpc', | ||
req, | ||
router: appRouter, | ||
createContext: createTRPCContext, | ||
}) | ||
|
||
export { handler as GET, handler as POST } |
Oops, something went wrong.