mirror of
https://github.com/linuxserver/budge.git
synced 2026-02-05 12:47:16 +08:00
added support for ordered categories
This commit is contained in:
parent
5bbcfbaa72
commit
d786ff2857
@ -88,7 +88,7 @@ class BudgE {
|
||||
}
|
||||
|
||||
try {
|
||||
return (await this.makeRequest(`budgets/${this.budgetId}/categories/groups`, 'post', { json: { name } })).data
|
||||
return (await this.makeRequest(`budgets/${this.budgetId}/categories/groups`, 'post', { json: { name, order: 0 } })).data
|
||||
} catch (err) {
|
||||
console.log(err.response.body)
|
||||
process.exit()
|
||||
@ -108,7 +108,7 @@ class BudgE {
|
||||
|
||||
try {
|
||||
console.log(`Creating category ${name}`)
|
||||
return (await this.makeRequest(`budgets/${this.budgetId}/categories`, 'post', { json: { name, categoryGroupId } })).data
|
||||
return (await this.makeRequest(`budgets/${this.budgetId}/categories`, 'post', { json: { name, categoryGroupId, order: 0 } })).data
|
||||
} catch (err) {
|
||||
console.log(err.response.body)
|
||||
process.exit()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user