refactor: home route is now /dashboard

This commit is contained in:
2026-03-25 16:07:48 +01:00
parent 5ca59b205e
commit 1d893719ef
3 changed files with 8 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import type { AuthFormField, FormSubmitEvent } from "@nuxt/ui";
definePageMeta({
middleware: () => {
const { loggedIn } = useUserSession();
if (loggedIn.value) return navigateTo("/");
if (loggedIn.value) return navigateTo("/dashboard");
},
});
@@ -31,7 +31,7 @@ const onSubmit = async (event: FormSubmitEvent<Schema>) => {
try {
await $fetch("/api/auth/sign-in", { method: "POST", body: event.data });
await fetchSession();
await navigateTo("/");
await navigateTo("/dashboard");
} catch (e) {
error.value = getApiError(e);
} finally {