Skip to content

Commit

Permalink
fix: correct arguments for hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Dec 13, 2023
1 parent b52ed08 commit 6e0193e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/server/api/session.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { requireUserSession, sessionHooks } from '../utils/session'
export default eventHandler(async (event) => {
const session = await requireUserSession(event)

await sessionHooks.callHookParallel('verify', event, session)
await sessionHooks.callHookParallel('verify', session, event)

return session
})
2 changes: 1 addition & 1 deletion src/runtime/server/utils/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function setUserSession (event: H3Event, data: UserSession) {
export async function clearUserSession (event: H3Event) {
const session = await _useSession(event)

await sessionHooks.callHookParallel('clear', event, session)
await sessionHooks.callHookParallel('clear', session.data, event)
await session.clear()

return true
Expand Down

0 comments on commit 6e0193e

Please sign in to comment.