get account list api supports only requesting visible accounts

This commit is contained in:
MaysWind
2020-12-17 23:32:37 +08:00
parent cef5a8375d
commit 7243dd699a
4 changed files with 26 additions and 10 deletions
+2 -2
View File
@@ -166,8 +166,8 @@ export default {
password
});
},
getAllAccounts: () => {
return axios.get('v1/accounts/list.json');
getAllAccounts: ({ visibleOnly }) => {
return axios.get('v1/accounts/list.json?visible_only=' + !!visibleOnly);
},
getAccount: ({ id }) => {
return axios.get('v1/accounts/get.json?id=' + id);
+2 -2
View File
@@ -318,7 +318,7 @@ export default {
self.loading = true;
self.$services.getAllAccounts().then(response => {
self.$services.getAllAccounts({ visibleOnly: false }).then(response => {
const data = response.data;
if (!data || !data.success || !data.result) {
@@ -358,7 +358,7 @@ export default {
const self = this;
self.$services.getAllAccounts().then(response => {
self.$services.getAllAccounts({ visibleOnly: false }).then(response => {
if (done) {
done();
}