refactor: phase 2 structural alignment — reports, importer, nodecli, pagination

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-05-20 00:22:39 +07:00
co-authored by Cursor
parent 1dd713514c
commit 250cdea35d
10 changed files with 895 additions and 686 deletions
+24
View File
@@ -0,0 +1,24 @@
package httpapi
import (
"net/http"
"strconv"
)
func parseListLimit(r *http.Request) int {
limit, _ := strconv.Atoi(r.URL.Query().Get("limit"))
if limit <= 0 {
return 50
}
if limit > 500 {
return 500
}
return limit
}
func strPtrOrNull(s string) any {
if s == "" {
return nil
}
return s
}