Improve exercise solution of 2.1, 2.2, 2.3 and 2.5

This commit is contained in:
2024-11-26 12:40:01 +01:00
parent b5364639a5
commit 07f486c72e
4 changed files with 77 additions and 22 deletions

View File

@@ -100,6 +100,18 @@ export const useAccountStore = defineStore("accountStore", {
}
},
async refreshAccount() {
getAccount(this.userAccountToken)
.then(response => {
this.userAccount = response.data
this.fetchInProgress = false
this.privilegeBuy = true
this.adminPanelVisible = response.data.accountRole.privilegeAdminPanel
})
},
/**
* Register a new account to the database
* Log in on success