working commit

This commit is contained in:
2026-02-23 00:07:38 +02:00
parent 685880c8a8
commit b6efc19f7a
41 changed files with 11938 additions and 93 deletions
+23
View File
@@ -216,3 +216,26 @@ func (hand *Handler) GetTags(rctx *router.Context) {
}
rctx.SendJSON(code, res.TagDescr)
}
// GET /v2/_catalog?n=1000 200 404
func (hand *Handler) ListManifests(rctx *router.Context) {
params := &operator.ListManifestsParams{}
// Rigth checking
operatorID, _ := rctx.GetString(userTag)
opEnable, err := hand.CheckRight(rctx.Ctx, operatorID, terms.RightReadImages, "_catalog")
if err != nil {
rctx.SetStatus(http.StatusInternalServerError)
return
}
if !opEnable {
rctx.SetStatus(http.StatusMethodNotAllowed)
return
}
// Execution of the operation
ctx := rctx.GetContext()
res, code, err := hand.oper.ListManifests(ctx, params)
if err != nil {
hand.logg.Errorf("ListManifests error: %v", err)
}
rctx.SendJSON(code, res)
}