chet novoe

This commit is contained in:
Vladimir Voronin
2024-10-30 12:49:10 +03:00
parent eede3430b0
commit 5e49e223ee
2 changed files with 91 additions and 63 deletions

View File

@@ -27,11 +27,11 @@ export const getBudgetInfos = async () => {
export const getBudgetTransactions = async (budgetId, transactionType, categoryType) => {
let url = `/budgets/${budgetId}/transactions`
if (transactionType) {
url += '/' + transactionType
if (transactionType && !categoryType) {
url += '/?type=' + transactionType
}
if (transactionType && categoryType) {
url += '/'+categoryType
url += '/'+transactionType+'/'+categoryType
}
// if (!categoryType) {
// throw new Error('No CategoryType');