diff --git a/admin.go b/admin.go index 258d0b8..6e0f3d5 100644 --- a/admin.go +++ b/admin.go @@ -208,7 +208,7 @@ func handleViewAdminUsers(app *App, u *User, w http.ResponseWriter, r *http.Requ p.Flashes, _ = getSessionFlashes(app, w, r, nil) p.TotalUsers = app.db.GetAllUsersCount() - ttlPages := p.TotalUsers / adminUsersPerPage + ttlPages := (p.TotalUsers - 1) / adminUsersPerPage + 1 p.TotalPages = []int{} for i := 1; i <= int(ttlPages); i++ { p.TotalPages = append(p.TotalPages, i)