Rename vars

This commit is contained in:
Jan Bader 2022-09-23 19:20:24 +00:00
parent 403544e99f
commit fc15d8b56e
2 changed files with 4 additions and 4 deletions

View File

@ -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)
}

View File

@ -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)
}