Extract package

This commit is contained in:
2022-02-23 21:30:28 +00:00
parent d89a8f4e2e
commit 28c20aacd3
11 changed files with 81 additions and 69 deletions

View File

@ -6,6 +6,7 @@ import (
"time"
"git.javil.eu/jacob1123/budgeteer/postgres"
"git.javil.eu/jacob1123/budgeteer/postgres/numeric"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
)
@ -35,7 +36,7 @@ func (h *Handler) newTransaction(c *gin.Context) {
return
}
amount := postgres.Numeric{}
amount := numeric.Numeric{}
err = amount.Set(payload.Amount)
if err != nil {
c.AbortWithError(http.StatusBadRequest, fmt.Errorf("amount: %w", err))