fix: detail site

This commit is contained in:
ferdiansyah783
2024-08-03 22:57:07 +07:00
parent 600d42d529
commit 265dd9b6e8
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -286,6 +286,7 @@ func (h *Handler) toSiteResponse(resp *entity.Site) response.Site {
IsDiscountActive: resp.IsDiscountActive,
CreatedAt: resp.CreatedAt.Format(time.RFC3339),
UpdatedAt: resp.UpdatedAt.Format(time.RFC3339),
Products: h.toProductResponseList(resp.Products),
}
}
+1
View File
@@ -17,6 +17,7 @@ type Site struct {
IsDiscountActive bool `json:"is_discount_active"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Products []Product `json:"products"`
}
type SiteName struct {