Skip to content

Commit 8315d58

Browse files
authored
fix: update default limit for budgets to 50 (#863)
1 parent ebb9ca5 commit 8315d58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controllers/budget_v3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type BudgetQueryFilterV3 struct {
1919
Currency string `form:"currency"` // By currency
2020
Search string `form:"search" filterField:"false"` // By string in name or note
2121
Offset uint `form:"offset" filterField:"false"` // The offset of the first Transaction returned. Defaults to 0.
22-
Limit int `form:"limit" filterField:"false"` // Maximum number of transactions to return. Defaults to -1 for all.
22+
Limit int `form:"limit" filterField:"false"` // Maximum number of transactions to return. Defaults to 50.
2323
}
2424

2525
// Budget is the API v3 representation of a Budget.
@@ -259,7 +259,7 @@ func (co Controller) GetBudgetsV3(c *gin.Context) {
259259
q = q.Offset(int(filter.Offset))
260260

261261
// Default to all Budgets and set the limit
262-
limit := -1
262+
limit := 50
263263
if slices.Contains(setFields, "Limit") {
264264
limit = filter.Limit
265265
}

0 commit comments

Comments
 (0)