Moving the domain models to a models package in expenses

This commit is contained in:
2025-08-07 18:02:28 +01:00
parent 86db133640
commit f0ca0051b6
15 changed files with 213 additions and 181 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"database/sql"
"encoding/json"
"expenses/expenses"
experr "expenses/expenses/errors"
"fmt"
"strconv"
@@ -204,7 +205,7 @@ func deleteExpense(c *gin.Context) {
}
err = payment.Delete()
if err == expenses.ErrNotFound {
if err == experr.ErrNotFound {
errMsg := fmt.Sprintf("category %d not found", expenseID)
c.String(http.StatusNotFound, errMsg)
return