Add Transaction to list after saving
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
jacob1123 committed 2022-02-15 09:14:06 +00:00
1 parent b3ff5cf055
commit 8fbdd78cb3
4 files changed
+29 -22

No files matched your search

+3 -2
View File
@@ -71,12 +71,13 @@ 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)
transaction, err := h.Service.CreateTransaction(c.Request.Context(), new)
if err != nil {
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("create transaction: %w", err))
return
}
return
c.JSON(http.StatusOK, transaction)
// }
/*
_, delete := c.GetPostForm("delete")