small fixes - but it works

This commit is contained in:
2025-07-21 21:01:18 +01:00
parent a679b7334c
commit 9db370d391
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ func (exp *Expense) Insert() error {
// TODO // TODO
// Add a transaction here so that it fails when necessary // Add a transaction here so that it fails when necessary
res, err := db.Exec(query, exp.Description, exp.Value, exp.ExpStore.StoreID, res, err := db.Exec(query, exp.Description, exp.Value, exp.ExpStore.StoreID,
exp.ExpCategory.CategoryID, exp.ExpType.TypeID, 0, exp.ExpDate, exp.ExpCategory.CategoryID, exp.ExpType.TypeID, 1, exp.ExpDate,
) )
if err != nil { if err != nil {
return err return err
-2
View File
@@ -6,7 +6,6 @@ import (
"expenses/expenses" "expenses/expenses"
"expenses/templating" "expenses/templating"
"fmt" "fmt"
"log"
"strconv" "strconv"
"net/http" "net/http"
@@ -223,7 +222,6 @@ func updateExpense(c *gin.Context) {
return return
} }
newExp.ExpID = expenseID newExp.ExpID = expenseID
log.Println(newExp)
err = newExp.Update() err = newExp.Update()
if err != nil { if err != nil {