File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 11import { eventHandler } from 'h3'
22import { getUserSession , sessionHooks } from '../utils/session'
3- import type { UserSessionRequired } from '#auth-utils'
43
54export default eventHandler ( async ( event ) => {
65 const session = await getUserSession ( event )
76
87 // If session is not empty, call fetch hook
98 if ( Object . keys ( session ) . length > 0 ) {
10- await sessionHooks . callHookParallel ( 'fetch' , session as UserSessionRequired , event )
9+ await sessionHooks . callHookParallel ( 'fetch' , session , event )
1110 }
1211
1312 const { secure, ...data } = session
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface SessionHooks {
1111 * - Add extra properties to the session
1212 * - Throw an error if the session could not be verified (with a database for example)
1313 */
14- fetch : ( session : UserSessionRequired , event : H3Event ) => void | Promise < void >
14+ fetch : ( session : UserSession , event : H3Event ) => void | Promise < void >
1515 /**
1616 * Called before clearing the session
1717 */
You can’t perform that action at this time.
0 commit comments