Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 13, 2024
1 parent 786703e commit eeed7c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default defineNuxtModule<ModuleOptions>({
'sessionHooks',
'getUserSession',
'setUserSession',
'replaceUserSession',
'clearUserSession',
'requireUserSession',
]
Expand Down
1 change: 1 addition & 0 deletions src/runtime/server/utils/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function setUserSession (event: H3Event, data: UserSession) {
export async function replaceUserSession (event: H3Event, data: UserSession) {
const session = await _useSession(event)

await session.clear()
await session.update(data)

return session.data
Expand Down

0 comments on commit eeed7c5

Please sign in to comment.