Skip to content

Commit

Permalink
chore: update build.
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianmikus committed Feb 6, 2024
1 parent 016a2c4 commit 216a35c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dist/module.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const module = defineNuxtModule({
});
}
const runtimeConfig = nuxt.options.runtimeConfig;
runtimeConfig.auth = defu(runtimeConfig.auth, options);
runtimeConfig.public.auth = defu(runtimeConfig.public.auth, options);
runtimeConfig.session = defu(runtimeConfig.session, {
name: "nuxt-session",
password: "",
Expand Down Expand Up @@ -105,14 +105,14 @@ const module = defineNuxtModule({
region: "",
userPoolId: ""
});
if (!runtimeConfig?.auth?.serverHandler?.getSession) {
if (!runtimeConfig?.public?.auth?.serverHandler?.getSession) {
addServerHandler({
handler: resolver.resolve("./runtime/server/api/session.delete"),
route: "/api/_auth/session",
method: "get"
});
}
if (!runtimeConfig?.auth?.serverHandler?.deleteSession) {
if (!runtimeConfig?.public?.auth?.serverHandler?.deleteSession) {
addServerHandler({
handler: resolver.resolve("./runtime/server/api/session.get"),
route: "/api/_auth/session",
Expand Down
2 changes: 1 addition & 1 deletion dist/runtime/composables/session.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useUserSession = () => {
};
};
async function fetch() {
const { auth: config } = useRuntimeConfig();
const { public: { auth: config } } = useRuntimeConfig();
useSessionState().value = await useRequestFetch()(config?.serverHandler?.getSession?.route || "/api/_auth/session", {
headers: {
Accept: "text/json"
Expand Down

0 comments on commit 216a35c

Please sign in to comment.