update limit popular products
This commit is contained in:
@@ -426,13 +426,9 @@ func (h *Handler) GetPopularProducts(c *gin.Context) {
|
|||||||
|
|
||||||
period := c.Query("period")
|
period := c.Query("period")
|
||||||
status := order2.Paid.String()
|
status := order2.Paid.String()
|
||||||
limitStr := c.Query("limit")
|
|
||||||
sortBy := c.Query("sort_by")
|
sortBy := c.Query("sort_by")
|
||||||
|
|
||||||
limit, err := strconv.Atoi(limitStr)
|
limit := 1000
|
||||||
if err != nil {
|
|
||||||
limit = 10 // default limit
|
|
||||||
}
|
|
||||||
|
|
||||||
if period != "d" && period != "w" && period != "m" {
|
if period != "d" && period != "w" && period != "m" {
|
||||||
period = "d"
|
period = "d"
|
||||||
|
|||||||
Reference in New Issue
Block a user