Extract package
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user