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