small fixes - but it works
This commit is contained in:
@@ -133,7 +133,7 @@ func (exp *Expense) Insert() error {
|
||||
// TODO
|
||||
// Add a transaction here so that it fails when necessary
|
||||
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 {
|
||||
return err
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"expenses/expenses"
|
||||
"expenses/templating"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
"net/http"
|
||||
@@ -223,7 +222,6 @@ func updateExpense(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
newExp.ExpID = expenseID
|
||||
log.Println(newExp)
|
||||
|
||||
err = newExp.Update()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user