Shortcodes

This commit is contained in:
cdricms
2025-02-10 08:52:32 +01:00
parent a7ad045631
commit 8e87d834bc
20 changed files with 485 additions and 71 deletions

View File

@@ -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().