File tree Expand file tree Collapse file tree 2 files changed +0
-12
lines changed
Expand file tree Collapse file tree 2 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,14 @@ import { appRouter } from "@/server/routers/_app";
33import { createContext } from "@/server/context" ;
44
55const handler = async ( req : Request ) => {
6- console . log ( `[PUBLIC TRPC] ${ req . method } ${ req . url } ` ) ;
76 return fetchRequestHandler ( {
87 endpoint : "/api/public/trpc" ,
98 req,
109 router : appRouter ,
1110 createContext : async ( ) => {
1211 const ctx = await createContext ( { req } ) ;
13- console . log ( "[PUBLIC TRPC] Context created" ) ;
1412 return ctx ;
1513 } ,
16- onError : ( { error, path } ) => {
17- console . error ( `[PUBLIC TRPC ERROR] path: ${ path } , error:` , error ) ;
18- } ,
1914 } ) ;
2015} ;
2116
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { auth } from "@/auth";
55import { headers } from "next/headers" ;
66
77const handler = async ( req : Request ) => {
8- console . log ( `[AUTH TRPC] ${ req . method } ${ req . url } ` ) ;
98 const session = await auth . api . getSession ( {
109 headers : await headers ( ) ,
1110 } ) ;
@@ -16,14 +15,8 @@ const handler = async (req: Request) => {
1615 router : appRouter ,
1716 createContext : async ( ) => {
1817 const ctx = await createContext ( { req, session } ) ;
19- console . log (
20- `[AUTH TRPC] Context created for user: ${ session ?. user ?. email || "anonymous" } ` ,
21- ) ;
2218 return ctx ;
2319 } ,
24- onError : ( { error, path } ) => {
25- console . error ( `[AUTH TRPC ERROR] path: ${ path } , error:` , error ) ;
26- } ,
2720 } ) ;
2821} ;
2922
You can’t perform that action at this time.
0 commit comments