fix frontend bugs

This commit is contained in:
Edd
2026-01-26 19:12:50 +00:00
parent 582cb3cb4c
commit 29ebda9b18
3 changed files with 13 additions and 9 deletions
+3
View File
@@ -53,6 +53,7 @@
import { useAuthStore } from "~/stores/auth-store.js";
import { storeToRefs } from "pinia";
const notifications = useNotificationStore();
const config = useRuntimeConfig();
const api = config.public.apiBase;
const authStore = useAuthStore();
@@ -94,8 +95,10 @@ async function handleLogin() {
token.value = response._data.token;
user.value = response._data.user;
if (response._data.user.mustChangePassword === true) {
notifications.error("Please update your password.");
router.push("/profile/update-password");
} else {
notifications.success("Logged in successfully!");
router.push("/");
}
}