mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Fix settings aka it does not do stuff when the user has logged in.
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Beta Image / build-and-push (push) Waiting to run
This commit is contained in:
parent
10e1354f27
commit
075e33d2af
1 changed files with 6 additions and 1 deletions
|
@ -27,6 +27,10 @@ const userData = ref({
|
|||
});
|
||||
const enteruseremail = ref();
|
||||
onMounted(async () => {
|
||||
await validateUserInfo();
|
||||
});
|
||||
|
||||
const validateUserInfo = async () => {
|
||||
const req = await fetch("/api/user/validateUserToken");
|
||||
const res = await req.json();
|
||||
if (res.current_spot === "LOGOUT") {
|
||||
|
@ -37,7 +41,7 @@ onMounted(async () => {
|
|||
userData.value = res;
|
||||
useremail.value = res.email;
|
||||
isLoggedIn.value = true;
|
||||
});
|
||||
};
|
||||
|
||||
const emit = defineEmits(["windowopener"]);
|
||||
|
||||
|
@ -166,6 +170,7 @@ const submitUserPassword = async () => {
|
|||
success.value = true;
|
||||
console.log(res);
|
||||
userAccount.value = "";
|
||||
await validateUserInfo();
|
||||
} else {
|
||||
error.value = true;
|
||||
errormsg.value = res.error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue