Add row to create new transaction

This commit is contained in:
2022-01-10 10:15:55 +00:00
parent e138c264ea
commit cc58c0d012
2 changed files with 43 additions and 0 deletions

View File

@ -13,6 +13,7 @@ type AccountData struct {
Account *postgres.Account
Categories []postgres.GetCategoriesRow
Transactions []postgres.GetTransactionsForAccountRow
Payees []postgres.Payee
}
func (h *Handler) account(c *gin.Context) {
@ -43,11 +44,18 @@ func (h *Handler) account(c *gin.Context) {
return
}
payees, err := h.Service.GetPayees(c.Request.Context(), data.Budget.ID)
if err != nil {
c.AbortWithError(http.StatusNotFound, err)
return
}
d := AccountData{
data,
&account,
categories,
transactions,
payees,
}
c.HTML(http.StatusOK, "account.html", d)