visit API, is_admin badge API, is_active badge API,
This commit is contained in:
@@ -6,7 +6,8 @@ export default defineStore('acctMgmtStore', {
|
||||
allUserAccoutList: [],
|
||||
isAcctMenuOpen: false,
|
||||
currentViewingUser: {
|
||||
detail: null,
|
||||
username: "",
|
||||
detail: {},
|
||||
},
|
||||
response: {
|
||||
deleteAccount: null,
|
||||
@@ -58,7 +59,6 @@ export default defineStore('acctMgmtStore', {
|
||||
const response = await this.$axios.get(apiGetUserList);
|
||||
const customizedResponseData = await this.customizeAllUserList(response.data);
|
||||
this.allUserAccoutList = customizedResponseData;
|
||||
console.log('getAllUserAccounts success');
|
||||
} catch(error) {
|
||||
apiError(error, 'Failed to get all users.');
|
||||
}
|
||||
@@ -110,7 +110,6 @@ export default defineStore('acctMgmtStore', {
|
||||
}
|
||||
}
|
||||
catch(error) {
|
||||
console.log('error', error, error.status, error.code);
|
||||
apiError(error, 'Failed to delete the account.');
|
||||
return false;
|
||||
};
|
||||
@@ -124,7 +123,10 @@ export default defineStore('acctMgmtStore', {
|
||||
|
||||
try{
|
||||
const response = await this.$axios.get(apiUserDetail);
|
||||
this.currentViewingUser.detail = response.data;
|
||||
this.currentViewingUser = {
|
||||
...this.currentViewingUser,
|
||||
detail: response.data,
|
||||
}
|
||||
if(response.status === 200) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user