mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user