Still migrating to postgres, have to check that everything works and fix stuff

This commit is contained in:
2025-09-02 23:50:19 +01:00
parent 6c5922bb5e
commit 4552b8c969
64 changed files with 1196 additions and 1279 deletions
+4 -2
View File
@@ -7,6 +7,7 @@ import (
experr "expenses/expenses/errors"
mod "expenses/expenses/models"
"fmt"
"log"
"net/http"
@@ -32,6 +33,7 @@ func expensesPartial(c *gin.Context) {
func ExpensesGlobalPage(c *gin.Context) {
expenses, err := exp.App.GetAllExpenses()
if err != nil {
log.Panicln("error:", err)
c.Header("HX-Redirect", "/500")
return
}
@@ -75,7 +77,7 @@ func expensePage(c *gin.Context) {
return
}
categories, err := exp.GetAllCategories()
categories, err := exp.App.GetAllCategories()
if err != nil {
ServerErrorView(c, "failed to fetch categories")
return
@@ -120,7 +122,7 @@ func expensePage(c *gin.Context) {
}
func newExpensePage(c *gin.Context) {
categories, err := exp.GetAllCategories()
categories, err := exp.App.GetAllCategories()
if err != nil {
ServerErrorView(c, "failed to fetch categories")
return