Skip to content

Commit

Permalink
feat: clearUserSession takes config arg as well
Browse files Browse the repository at this point in the history
Related to #204
  • Loading branch information
arkhaiel authored Oct 5, 2024
1 parent e039625 commit 69eaf42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/server/utils/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export async function replaceUserSession(event: H3Event, data: UserSession, conf
* @param event The Request (h3) event
* @returns true if the session was cleared
*/
export async function clearUserSession(event: H3Event) {
const session = await _useSession(event)
export async function clearUserSession(event: H3Event, config?: Partial<SessionConfig>) {
const session = await _useSession(event, config)

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

0 comments on commit 69eaf42

Please sign in to comment.