summaryrefslogtreecommitdiff
path: root/gui/src/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ajax')
-rw-r--r--gui/src/ajax/backend.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/src/ajax/backend.ts b/gui/src/ajax/backend.ts
index 90a7ea5..4a2462f 100644
--- a/gui/src/ajax/backend.ts
+++ b/gui/src/ajax/backend.ts
@@ -1,5 +1,6 @@
import { BalanceMap, newCategoryBalanceMapFromDto } from "../types/balanceMap";
import { BudgetMap, newBudgetMapFromDto } from "../types/budgetMap";
+import { BudgetUpdate, newBudgetUpdateFromDto } from "../types/budgetUpdate";
import { Category, newCategoryFromDto } from "../types/category";
const backendUrl = "http://localhost:8000";
@@ -23,6 +24,13 @@ function makeGetter<T>(params: FetcherMakerParams<T>): Getter<T> {
};
}
+export const getAllBudgetUpdates: Getter<BudgetUpdate[]> = makeGetter<
+ BudgetUpdate[]
+>({
+ path: "/budget-update",
+ elementParser: newBudgetUpdateFromDto,
+});
+
export const getAllCategories: Getter<Category[]> = async () => {
const balances = await getAllCategoryBalances();
const budgets = await getAllCurrentCategoryBudgets();