Skip to content

Commit

Permalink
use isAppSessionQuery()
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee committed Jul 15, 2024
1 parent bcdd016 commit 1d84ff2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion space-plugins/nuxt-base/server/utils/getAppSession.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
inferSessionQuery,
getSessionStore,
isAppSessionQuery,
} from '@storyblok/app-extension-auth';

import type { H3Event } from 'h3';
Expand Down Expand Up @@ -33,7 +34,7 @@ export const getAppSession = async (event: H3Event) => {
res: event.node.res,
});
const appSession = event.context.appSession;
if (appSession && appSession.spaceId && appSession.userId) {
if (isAppSessionQuery(appSession)) {
return await sessionStore.get({
spaceId: appSession.spaceId,
userId: appSession.userId,
Expand Down

0 comments on commit 1d84ff2

Please sign in to comment.