mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
support modify account
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user