mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 21:14:23 +00:00
Add validate user & optimize code from coderabbit via PR #6
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
b862f4cdb0
commit
ad0f13a1a2
3 changed files with 19 additions and 2 deletions
|
@ -43,6 +43,11 @@ const validateUserInfo = async () => {
|
|||
isLoggedIn.value = true;
|
||||
};
|
||||
|
||||
const intervalTime = 1000 * 60 * 2; // Validate user Info for every ten min while the admin page is opened.
|
||||
setInterval(async () => {
|
||||
await validateUserInfo();
|
||||
}, intervalTime);
|
||||
|
||||
const emit = defineEmits(["windowopener"]);
|
||||
|
||||
const logoutAction = async () => {
|
||||
|
@ -96,6 +101,7 @@ const showDeleteDialog = ref(false);
|
|||
const showLogoutDialog = ref(false);
|
||||
const confirmDelete = async () => {
|
||||
await deleteAccount();
|
||||
await validateUserInfo();
|
||||
showDeleteDialog.value = false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue