mirror of
https://github.com/gabehf/BudgetBuddy.git
synced 2026-03-17 03:06:40 -07:00
new endpoints, budget adjustment
This commit is contained in:
parent
cc36b80e72
commit
c4047a36cc
9 changed files with 276 additions and 20 deletions
|
|
@ -41,7 +41,7 @@ func GetMonthExpenses(w http.ResponseWriter, r *http.Request) {
|
|||
if user.Expenses[i].Timestamp < time.Now().Add(-30*24*time.Hour).Unix() {
|
||||
break
|
||||
}
|
||||
total = money.Add(total, user.Expenses[i].Amount)
|
||||
total = money.Add(user.Expenses[i].Amount, total)
|
||||
}
|
||||
|
||||
ret, err := json.Marshal(total)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue