Rename budgeting to budget
This commit is contained in:
parent
eb2b31e622
commit
cce9f29f17
@ -69,5 +69,5 @@ func (h *Handler) editAccount(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
h.returnBudgetingData(c, account.BudgetID)
|
h.getBudget(c, account.BudgetID)
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ type BudgetingResponse struct {
|
|||||||
Budget postgres.Budget
|
Budget postgres.Budget
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) budgeting(c *gin.Context) {
|
func (h *Handler) budget(c *gin.Context) {
|
||||||
budgetID := c.Param("budgetid")
|
budgetID := c.Param("budgetid")
|
||||||
budgetUUID, err := uuid.Parse(budgetID)
|
budgetUUID, err := uuid.Parse(budgetID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -134,10 +134,10 @@ func (h *Handler) budgeting(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
h.returnBudgetingData(c, budgetUUID)
|
h.getBudget(c, budgetUUID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) returnBudgetingData(c *gin.Context, budgetUUID uuid.UUID) {
|
func (h *Handler) getBudget(c *gin.Context, budgetUUID uuid.UUID) {
|
||||||
budget, err := h.Service.GetBudget(c.Request.Context(), budgetUUID)
|
budget, err := h.Service.GetBudget(c.Request.Context(), budgetUUID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.AbortWithError(http.StatusNotFound, err)
|
c.AbortWithError(http.StatusNotFound, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user