chore: build
Backend - Build & Lint / build (push) Successful in 32m22s
Frontend Admin - EAS Build / build (push) Successful in 1h39m14s

This commit is contained in:
Cameron Foussard
2026-11-03 09:12:36 +01:00
parent 0a18460f13
commit ae89d995d2
5 changed files with 98 additions and 15 deletions
+13 -2
View File
@@ -544,11 +544,22 @@ func GetAllUsers(c *gin.Context) {
log.Printf("✅ [GET_ALL_USERS] %d users récupérés (offset=%d, total=%d)", len(sanitized), offset, total)
c.JSON(http.StatusOK, gin.H{
resp := gin.H{
"users": sanitized,
"count": total,
"has_more": int64(offset+len(users)) < total,
})
}
// Totaux globaux par rôle (indépendants de la pagination) : uniquement
// sur la première page, c'est là que le front les lit.
if offset == 0 {
if counts, err := database.GetUserCounts(); err != nil {
log.Printf("⚠️ [GET_ALL_USERS] Comptage par rôle impossible: %v", err)
} else {
resp["counts"] = counts
}
}
c.JSON(http.StatusOK, resp)
}
func GetAllDeliveryMen(c *gin.Context) {