fix: #327 add needed await keyword

This commit is contained in:
Cindy Chang
2024-08-09 16:07:08 +08:00
parent 17e51ca98a
commit d8c1e84622
4 changed files with 15 additions and 31 deletions

View File

@@ -43,11 +43,11 @@ export default defineComponent({
const router = useRouter();
const onDeleteConfirmBtnClick = async() => {
if(acctMgmtStore.deleteAccount(acctMgmtStore.currentViewingUser.username)){
if(await acctMgmtStore.deleteAccount(acctMgmtStore.currentViewingUser.username)){
toast.success(i18next.t("AcctMgmt.MsgAccountDeleteSuccess"));
modalStore.closeModal();
acctMgmtStore.setShouldUpdateList(true);
router.push("/account-admin");
await router.push("/account-admin");
}
}