@@ -230,7 +230,7 @@ func ListAppVersions(req *restful.Request, resp *restful.Response) {
|
||||
if statistics {
|
||||
for _, item := range result.Items {
|
||||
if version, ok := item.(*openpitrix.AppVersion); ok {
|
||||
statisticsResult, err := openpitrix.ListApplications(¶ms.Conditions{Match: map[string]string{"app_id": version.AppId, "version_id": version.VersionId}}, 0, 0, "", false)
|
||||
statisticsResult, err := openpitrix.ListApplications(¶ms.Conditions{Match: map[string]string{openpitrix.AppId: version.AppId, openpitrix.VersionId: version.VersionId}}, 0, 0, "", false)
|
||||
if err != nil {
|
||||
klog.Errorln(err)
|
||||
resp.WriteHeaderAndEntity(http.StatusInternalServerError, errors.Wrap(err))
|
||||
|
||||
@@ -151,7 +151,7 @@ func ListCategories(req *restful.Request, resp *restful.Response) {
|
||||
if statistics {
|
||||
for _, item := range result.Items {
|
||||
if category, ok := item.(*openpitrix.Category); ok {
|
||||
statisticsResult, err := openpitrix.ListApps(¶ms.Conditions{Match: map[string]string{"category_id": category.CategoryID, "status": openpitrix.StatusActive, "repo": openpitrix.BuiltinRepoId}}, "", false, 0, 0)
|
||||
statisticsResult, err := openpitrix.ListApps(¶ms.Conditions{Match: map[string]string{openpitrix.CategoryId: category.CategoryID, openpitrix.Status: openpitrix.StatusActive, openpitrix.RepoId: openpitrix.BuiltinRepoId}}, "", false, 0, 0)
|
||||
if err != nil {
|
||||
klog.Errorln(err)
|
||||
resp.WriteHeaderAndEntity(http.StatusInternalServerError, errors.Wrap(err))
|
||||
|
||||
Reference in New Issue
Block a user