support modify account

This commit is contained in:
MaysWind
2020-11-15 23:11:14 +08:00
parent f74ea31c6d
commit 84317975c8
11 changed files with 408 additions and 34 deletions
+14
View File
@@ -166,6 +166,9 @@ export default {
getAllAccounts: () => {
return axios.get('v1/accounts/list.json');
},
getAccount: ({ id }) => {
return axios.get('v1/accounts/get.json?id=' + id);
},
addAccount: ({ category, type, name, icon, currency, comment, subAccounts }) => {
return axios.post('v1/accounts/add.json', {
category,
@@ -177,6 +180,17 @@ export default {
subAccounts
});
},
modifyAccount: ({ id, category, name, icon, comment, hidden, subAccounts }) => {
return axios.post('v1/accounts/modify.json', {
id,
category,
name,
icon,
comment,
hidden,
subAccounts
});
},
hideAccount: ({ id, hidden }) => {
return axios.post('v1/accounts/hide.json', {
id,