Return JSON and move /budget/:budgetid to API endpoint
This commit is contained in:
@ -116,7 +116,7 @@ func (h *Handler) budgeting(c *gin.Context) {
|
||||
|
||||
d.AvailableBalance = availableBalance
|
||||
|
||||
c.HTML(http.StatusOK, "budgeting.html", d)
|
||||
c.JSON(http.StatusOK, d)
|
||||
}
|
||||
|
||||
func (h *Handler) calculateBalances(c *gin.Context, budget postgres.Budget, firstOfNextMonth time.Time, firstOfMonth time.Time, categories []postgres.GetCategoriesRow, cumultativeBalances []postgres.GetCumultativeBalancesRow) ([]CategoryWithBalance, float64, error) {
|
||||
|
Reference in New Issue
Block a user