31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
import { d as defineNuxtRouteMiddleware, n as navigateTo } from "../server.mjs";
|
|
import { u as useCookie } from "./cookie-CWIsZYm7.js";
|
|
import "vue";
|
|
import "/app/node_modules/ofetch/dist/node.mjs";
|
|
import "#internal/nuxt/paths";
|
|
import "/app/node_modules/hookable/dist/index.mjs";
|
|
import "/app/node_modules/unctx/dist/index.mjs";
|
|
import "/app/node_modules/h3/dist/index.mjs";
|
|
import "pinia";
|
|
import "/app/node_modules/defu/dist/defu.mjs";
|
|
import "vue-router";
|
|
import "/app/node_modules/ufo/dist/index.mjs";
|
|
import "/app/node_modules/klona/dist/index.mjs";
|
|
import "vue/server-renderer";
|
|
import "/app/node_modules/cookie-es/dist/index.mjs";
|
|
import "/app/node_modules/destr/dist/index.mjs";
|
|
import "/app/node_modules/ohash/dist/index.mjs";
|
|
const auth = defineNuxtRouteMiddleware((to, from) => {
|
|
if (to.path === "/login") {
|
|
return;
|
|
}
|
|
const tokenCookie = useCookie("access_token");
|
|
if (!tokenCookie.value) {
|
|
return navigateTo("/login");
|
|
}
|
|
});
|
|
export {
|
|
auth as default
|
|
};
|
|
//# sourceMappingURL=auth-D_CY0lMs.js.map
|