Add row to create new transaction
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user