| 12345678910111213 |
- import {navigateTo, useRuntimeConfig} from "#app";
- import Url from "~/services/utils/url";
- export const useRedirectToLogin = () => {
- const runtimeConfig = useRuntimeConfig()
- return () => {
- if (!runtimeConfig.baseUrlAdminLegacy) {
- throw new Error('Configuration error : no redirection target')
- }
- navigateTo(Url.join(runtimeConfig.baseUrlAdminLegacy, '#/login'), {external: true})
- }
- }
|