fix unused code
CI / lint-backend (push) Successful in 1m22s
CI / lint-mobile (push) Successful in 8m11s
CI / test-backend (push) Successful in 1m48s
CI / test-mobile (push) Successful in 8m15s
CI / build-backend (push) Successful in 43s
CI / docker (push) Failing after 31s

This commit is contained in:
venture
2026-09-21 20:20:15 +02:00
parent 6b6f43bca9
commit ed05093370
3 changed files with 23 additions and 14 deletions
-11
View File
@@ -11,17 +11,6 @@ import (
"github.com/kazier/backend/service"
)
func intParam(value string, fallback int) int {
if value == "" {
return fallback
}
parsed, err := strconv.Atoi(value)
if err != nil || parsed < 1 {
return fallback
}
return parsed
}
// parsePageParams valide page/pageSize (400 si garbage, cf. FEEDBACK A7/A16)
// au lieu du fallback silencieux. Cap pageSize 200 et offset 100000.
func parsePageParams(c *gin.Context) (page, pageSize int, ok bool) {
+3 -3
View File
@@ -15,9 +15,9 @@ import (
// complet). Garbage ou négatif → ok=false : le handler répond 400
// INVALID_REQUEST, jamais de repli silencieux vers 0 (un curseur malformé
// pris pour « sync complet » masquerait une désynchro client).
// NOTE : intParam (files.go, LOT 2) garde son repli-défaut historique pour la
// pagination ; la validation stricte 400 des pages relève du LOT 2
// (inter-lots).
// NOTE : la pagination (files.go) répond 400 sur page/pageSize malformés,
// jamais de repli silencieux vers un défaut (un curseur malformé pris pour
// « sync complet » masquerait une désynchro client).
func parseAfterMs(raw string) (int64, bool) {
if raw == "" {
return 0, true