feat(api): serve filtered, sorted pages of package rows

GET /api/packages?layout=rows adds q, registry, verdict, severity, sort, order, page and page_size, and returns total and per-verdict counts. Requests without layout=rows keep the existing response.
This commit is contained in:
2026-11-24 01:33:27 +00:00
parent ad8295455d
commit 55c60cb8e4
3 changed files with 451 additions and 0 deletions
+3
View File
@@ -209,6 +209,9 @@ func vulnerabilityInfo(pkg *metadata.Package, decisions map[string]scanner.ScanD
}
func (a *App) handleListPackages(c fiber.Ctx) error {
if c.Query("layout") == layoutRows {
return a.handleListPackageRows(c)
}
ctx := c.Context()
params, err := parseListParams(c)
if err != nil {