Bugfix: list repos

Signed-off-by: Zhengyi Lai <zheng1@yunify.com>
This commit is contained in:
Zhengyi Lai
2020-07-22 18:55:25 +08:00
parent 1096eb8adb
commit 90e6565327

View File

@@ -853,6 +853,10 @@ func (h *openpitrixHandler) ListRepos(req *restful.Request, resp *restful.Respon
reverse := params.GetBoolValueWithDefault(req, params.ReverseParam, false)
conditions, err := params.ParseConditions(req)
if req.PathParameter("workspace") != "" {
conditions.Match[openpitrix.WorkspaceLabel] = req.PathParameter("workspace")
}
if err != nil {
klog.V(4).Infoln(err)
api.HandleBadRequest(resp, nil, err)