Shortcodes
This commit is contained in:
@@ -36,7 +36,8 @@ func HandleMedia(w http.ResponseWriter, r *http.Request) {
|
||||
Model((*models.Media)(nil)).
|
||||
Count(context.Background())
|
||||
|
||||
totalPages := int(math.Max(1, float64(total/limit)))
|
||||
upperBound := float64(total) / float64(limit)
|
||||
totalPages := int(math.Max(1, math.Ceil(upperBound)))
|
||||
|
||||
var media []models.Media
|
||||
err = core.DB.NewSelect().
|
||||
|
||||
Reference in New Issue
Block a user