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(
|
return c.Status(fiber.StatusOK).JSON(utils.FormatResponse(
|
||||||
fiber.StatusOK,
|
fiber.StatusOK,
|
||||||
"Banners fetched successfully",
|
"Banners fetched successfully",
|
||||||
struct {
|
bannerResponses,
|
||||||
Banners []dto.BannerResponse `json:"banners"`
|
|
||||||
}{
|
|
||||||
Banners: bannerResponses,
|
|
||||||
},
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,7 @@ func GetUserInitialCoint(c *fiber.Ctx) error {
|
||||||
return c.Status(fiber.StatusOK).JSON(utils.FormatResponse(
|
return c.Status(fiber.StatusOK).JSON(utils.FormatResponse(
|
||||||
fiber.StatusOK,
|
fiber.StatusOK,
|
||||||
"Points fetched successfully",
|
"Points fetched successfully",
|
||||||
struct {
|
pointResponses,
|
||||||
Points []dto.PointResponse `json:"points"`
|
|
||||||
}{
|
|
||||||
Points: pointResponses,
|
|
||||||
},
|
|
||||||
))
|
))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue