Rename vars
This commit is contained in:
parent
403544e99f
commit
fc15d8b56e
@ -23,7 +23,7 @@ func (h *Handler) newCategoryGroup(c echo.Context) error {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "category group is required")
|
||||
}
|
||||
|
||||
budget, err := h.Service.CreateCategoryGroup(c.Request().Context(), postgres.CreateCategoryGroupParams{
|
||||
categoryGroup, err := h.Service.CreateCategoryGroup(c.Request().Context(), postgres.CreateCategoryGroupParams{
|
||||
BudgetID: newCategory.BudgetID,
|
||||
Name: newCategory.Group,
|
||||
})
|
||||
@ -31,5 +31,5 @@ func (h *Handler) newCategoryGroup(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.JSON(http.StatusOK, budget)
|
||||
return c.JSON(http.StatusOK, categoryGroup)
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func (h *Handler) newCategory(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
budget, err := h.Service.CreateCategory(c.Request().Context(), postgres.CreateCategoryParams{
|
||||
category, err := h.Service.CreateCategory(c.Request().Context(), postgres.CreateCategoryParams{
|
||||
CategoryGroupID: categoryGroup.ID,
|
||||
Name: newCategory.Name,
|
||||
})
|
||||
@ -44,5 +44,5 @@ func (h *Handler) newCategory(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.JSON(http.StatusOK, budget)
|
||||
return c.JSON(http.StatusOK, category)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user