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 1
1
import { eventHandler } from 'h3'
2
2
import { getUserSession , sessionHooks } from '../utils/session'
3
- import type { UserSessionRequired } from '#auth-utils'
4
3
5
4
export default eventHandler ( async ( event ) => {
6
5
const session = await getUserSession ( event )
7
6
8
7
// If session is not empty, call fetch hook
9
8
if ( Object . keys ( session ) . length > 0 ) {
10
- await sessionHooks . callHookParallel ( 'fetch' , session as UserSessionRequired , event )
9
+ await sessionHooks . callHookParallel ( 'fetch' , session , event )
11
10
}
12
11
13
12
const { secure, ...data } = session
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface SessionHooks {
11
11
* - Add extra properties to the session
12
12
* - Throw an error if the session could not be verified (with a database for example)
13
13
*/
14
- fetch : ( session : UserSessionRequired , event : H3Event ) => void | Promise < void >
14
+ fetch : ( session : UserSession , event : H3Event ) => void | Promise < void >
15
15
/**
16
16
* Called before clearing the session
17
17
*/
You can’t perform that action at this time.
0 commit comments