File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 106106- DigitalNaut
107107- DimaAmega
108108- dmitrytarassov
109+ - dogxii
109110- dokeet
110111- doytch
111112- Drishtantr
Original file line number Diff line number Diff line change @@ -110,10 +110,7 @@ Here's an example middleware to check for logged in users and set the user in
110110` context ` you can then access from loaders:
111111
112112``` tsx filename=routes/_auth.tsx
113- async function authMiddleware ({
114- request ,
115- context ,
116- }) => {
113+ async function authMiddleware({ request , context }) {
117114 const session = await getSession (request );
118115 const userId = session .get (" userId" );
119116
@@ -153,7 +150,7 @@ async function loggingMiddleware(
153150 await next (); // 👈 No Response returned
154151 const duration = performance .now () - start ;
155152 console .log (
156- ` ${new Date ().toISOString ()} Response ${ response . status } (${duration }ms) ` ,
153+ ` ${new Date ().toISOString ()} (${duration }ms) ` ,
157154 );
158155 // ✅ No need to return anything
159156}
You can’t perform that action at this time.
0 commit comments