refactor: home route is now /dashboard
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user