fix frontend bugs
This commit is contained in:
@@ -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("/");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user