Remember uploaded images
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
export default defineNuxtRouteMiddleware(() => {
|
||||
export default defineNuxtRouteMiddleware((to) => {
|
||||
const { loggedIn } = useUserSession();
|
||||
|
||||
if (!loggedIn.value) {
|
||||
const localePath = useLocalePath();
|
||||
return navigateTo(localePath('/login'));
|
||||
return navigateTo(localePath(`/login?to=${to.path}`));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user