refact: change response struct get data

This commit is contained in:
pahmiudahgede 2024-12-15 02:49:49 +07:00
parent d362edad65
commit 40d4d10461
2 changed files with 2 additions and 10 deletions

View File

@ -34,11 +34,7 @@ func GetBanners(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(utils.FormatResponse(
fiber.StatusOK,
"Banners fetched successfully",
struct {
Banners []dto.BannerResponse `json:"banners"`
}{
Banners: bannerResponses,
},
bannerResponses,
))
}

View File

@ -39,11 +39,7 @@ func GetUserInitialCoint(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(utils.FormatResponse(
fiber.StatusOK,
"Points fetched successfully",
struct {
Points []dto.PointResponse `json:"points"`
}{
Points: pointResponses,
},
pointResponses,
))
}