refact: change response struct get data
This commit is contained in:
parent
d362edad65
commit
40d4d10461
|
@ -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,
|
||||
))
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
))
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue