diff --git a/server/account.go b/server/account.go index 1bae15f..9e04631 100644 --- a/server/account.go +++ b/server/account.go @@ -10,11 +10,11 @@ import ( ) type FilterTransactionsRequest struct { - CategoryID string `json:"category_id"` - PayeeID string `json:"payee_id"` - AccountID string `json:"account_id"` - FromDate time.Time `json:"from_date"` - ToDate time.Time `json:"to_date"` + CategoryID string `json:"categoryId"` + PayeeID string `json:"payeeId"` + AccountID string `json:"accountId"` + FromDate time.Time `json:"fromDate"` + ToDate time.Time `json:"toDate"` } func (h *Handler) filteredTransactions(c echo.Context) error { @@ -58,7 +58,7 @@ func parseEmptyUUID(value string) (uuid.NullUUID, bool) { return uuid.NullUUID{}, false } - return uuid.NullUUID{val, true}, true + return uuid.NullUUID{UUID: val, Valid: true}, true } func (h *Handler) problematicTransactions(c echo.Context) error { diff --git a/web/src/stores/transactions.ts b/web/src/stores/transactions.ts index 1e4d6d0..cb90112 100644 --- a/web/src/stores/transactions.ts +++ b/web/src/stores/transactions.ts @@ -93,11 +93,11 @@ export const useTransactionsStore = defineStore("budget/transactions", { async GetFilteredTransactions(accountID : string | null, categoryID : string | null, payeeID : string | null, fromDate : string, toDate : string) { const budgetStore = useBudgetsStore(); const payload = JSON.stringify({ - category_id: categoryID, - payee_id: payeeID, - account_id: accountID, - from_date: fromDate, - to_date: toDate, + categoryId: categoryID, + payeeId: payeeID, + accountId: accountID, + fromDate: fromDate, + toDate: toDate, }); const result = await POST("/budget/" + budgetStore.CurrentBudgetID + "/filtered-transactions", payload); const response = await result.json();