Minimal linting improvements

This commit is contained in:
2022-02-20 21:19:28 +00:00
parent 545f223a97
commit c03d16878a
10 changed files with 23 additions and 17 deletions

View File

@ -50,7 +50,7 @@ func (h *Handler) newTransaction(c *gin.Context) {
}*/
// if !transactionUUID.Valid {
new := postgres.CreateTransactionParams{
newTransaction := postgres.CreateTransactionParams{
Memo: payload.Memo,
Date: time.Time(payload.Date),
Amount: amount,
@ -59,7 +59,7 @@ func (h *Handler) newTransaction(c *gin.Context) {
CategoryID: payload.Category.ID, // TODO handle new category
Status: postgres.TransactionStatus(payload.State),
}
_, err = h.Service.CreateTransaction(c.Request.Context(), new)
_, err = h.Service.CreateTransaction(c.Request.Context(), newTransaction)
if err != nil {
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("create transaction: %w", err))
}