Merge pull request #2318 from wansir/op

revert openpitrix API
This commit is contained in:
KubeSphere CI Bot
2020-07-06 21:24:45 +08:00
committed by GitHub
3 changed files with 124 additions and 13 deletions

View File

@@ -378,7 +378,7 @@ func (h *openpitrixHandler) ListAppVersions(req *restful.Request, resp *restful.
if statistics { if statistics {
for _, item := range result.Items { for _, item := range result.Items {
if version, ok := item.(*openpitrix.AppVersion); ok { if version, ok := item.(*openpitrix.AppVersion); ok {
statisticsResult, err := h.openpitrix.ListApplications(&params.Conditions{Match: map[string]string{"app_id": version.AppId, "version_id": version.VersionId}}, 0, 0, "", false) statisticsResult, err := h.openpitrix.ListApplications(&params.Conditions{Match: map[string]string{openpitrix.AppId: version.AppId, openpitrix.VersionId: version.VersionId}}, 0, 0, "", false)
if err != nil { if err != nil {
klog.Errorln(err) klog.Errorln(err)
api.HandleInternalError(resp, nil, err) api.HandleInternalError(resp, nil, err)
@@ -399,16 +399,20 @@ func (h *openpitrixHandler) ListApps(req *restful.Request, resp *restful.Respons
statistics := params.GetBoolValueWithDefault(req, "statistics", false) statistics := params.GetBoolValueWithDefault(req, "statistics", false)
conditions, err := params.ParseConditions(req) conditions, err := params.ParseConditions(req)
if req.PathParameter("workspace") != "" {
conditions.Match["isv"] = req.PathParameter("workspace")
}
if err != nil { if err != nil {
klog.V(4).Infoln(err) klog.V(4).Infoln(err)
api.HandleBadRequest(resp, nil, err) api.HandleBadRequest(resp, nil, err)
return return
} }
if req.PathParameter("workspace") != "" {
conditions.Match[openpitrix.ISV] = req.PathParameter("workspace")
}
if conditions.Match[openpitrix.ISV] == "" {
conditions.Match[openpitrix.ISV] = req.QueryParameter("workspace")
}
result, err := h.openpitrix.ListApps(conditions, orderBy, reverse, limit, offset) result, err := h.openpitrix.ListApps(conditions, orderBy, reverse, limit, offset)
if err != nil { if err != nil {

View File

@@ -160,6 +160,14 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Param(webservice.PathParameter("namespace", "the name of the project").Required(true)). Param(webservice.PathParameter("namespace", "the name of the project").Required(true)).
Param(webservice.PathParameter("application", "the id of the application").Required(true))) Param(webservice.PathParameter("application", "the id of the application").Required(true)))
webservice.Route(webservice.POST("/apps/{app}/versions").
To(handler.CreateAppVersion).
Doc("Create a new app template version").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Reads(openpitrix2.CreateAppVersionRequest{}).
Param(webservice.QueryParameter("validate", "Validate format of package(pack by op tool)")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppVersionResponse{}).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/versions"). webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/versions").
To(handler.CreateAppVersion). To(handler.CreateAppVersion).
Doc("Create a new app template version"). Doc("Create a new app template version").
@@ -168,6 +176,13 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Param(webservice.QueryParameter("validate", "Validate format of package(pack by op tool)")). Param(webservice.QueryParameter("validate", "Validate format of package(pack by op tool)")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppVersionResponse{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppVersionResponse{}).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.DELETE("/apps/{app}/versions/{version}").
To(handler.DeleteAppVersion).
Doc("Delete the specified app template version").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.DELETE("/workspaces/{workspace}/apps/{app}/versions/{version}"). webservice.Route(webservice.DELETE("/workspaces/{workspace}/apps/{app}/versions/{version}").
To(handler.DeleteAppVersion). To(handler.DeleteAppVersion).
Doc("Delete the specified app template version"). Doc("Delete the specified app template version").
@@ -175,6 +190,15 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Returns(http.StatusOK, api.StatusOK, errors.Error{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.PATCH("/apps/{app}/versions/{version}").
Consumes(mimePatch...).
To(handler.ModifyAppVersion).
Doc("Patch the specified app template version").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Reads(openpitrix2.ModifyAppVersionRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.PATCH("/workspaces/{workspace}/apps/{app}/versions/{version}"). webservice.Route(webservice.PATCH("/workspaces/{workspace}/apps/{app}/versions/{version}").
Consumes(mimePatch...). Consumes(mimePatch...).
To(handler.ModifyAppVersion). To(handler.ModifyAppVersion).
@@ -217,6 +241,12 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Returns(http.StatusOK, api.StatusOK, openpitrix2.GetAppVersionPackageResponse{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.GetAppVersionPackageResponse{}).
Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/apps/{app}/versions/{version}/action").
To(handler.DoAppVersionAction).
Doc("Perform submit or other operations on app").
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/versions/{version}/action"). webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/versions/{version}/action").
To(handler.DoAppVersionAction). To(handler.DoAppVersionAction).
Doc("Perform submit or other operations on app"). Doc("Perform submit or other operations on app").
@@ -245,6 +275,13 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Doc("List audits information of the specific app template"). Doc("List audits information of the specific app template").
Param(webservice.PathParameter("app", "app template id")). Param(webservice.PathParameter("app", "app template id")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionAudit{})) Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionAudit{}))
webservice.Route(webservice.POST("/apps").
To(handler.CreateApp).
Doc("Create a new app template").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppResponse{}).
Reads(openpitrix2.CreateAppRequest{}).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/workspaces/{workspace}/apps"). webservice.Route(webservice.POST("/workspaces/{workspace}/apps").
To(handler.CreateApp). To(handler.CreateApp).
Doc("Create a new app template"). Doc("Create a new app template").
@@ -252,12 +289,26 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppResponse{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateAppResponse{}).
Reads(openpitrix2.CreateAppRequest{}). Reads(openpitrix2.CreateAppRequest{}).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.DELETE("/apps/{app}").
To(handler.DeleteApp).
Doc("Delete the specified app template").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.DELETE("/workspaces/{workspace}/apps/{app}"). webservice.Route(webservice.DELETE("/workspaces/{workspace}/apps/{app}").
To(handler.DeleteApp). To(handler.DeleteApp).
Doc("Delete the specified app template"). Doc("Delete the specified app template").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.PATCH("/apps/{app}").
Consumes(mimePatch...).
To(handler.ModifyApp).
Doc("Patch the specified app template").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Reads(openpitrix2.ModifyAppVersionRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.PATCH("/workspaces/{workspace}/apps/{app}"). webservice.Route(webservice.PATCH("/workspaces/{workspace}/apps/{app}").
Consumes(mimePatch...). Consumes(mimePatch...).
To(handler.ModifyApp). To(handler.ModifyApp).
@@ -272,6 +323,12 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersion{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersion{}).
Param(webservice.PathParameter("app", "app template id"))) Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/apps/{app}/action").
To(handler.DoAppAction).
Doc("Perform recover or suspend operation on app").
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("version", "app template version id")).
Param(webservice.PathParameter("app", "app template id")))
webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/action"). webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/action").
To(handler.DoAppAction). To(handler.DoAppAction).
Doc("Perform recover or suspend operation on app"). Doc("Perform recover or suspend operation on app").
@@ -352,6 +409,13 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Param(webservice.PathParameter("attachment", "attachment id")). Param(webservice.PathParameter("attachment", "attachment id")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.Attachment{})) Returns(http.StatusOK, api.StatusOK, openpitrix2.Attachment{}))
webservice.Route(webservice.POST("/repos").
To(handler.CreateRepo).
Doc("Create repository in the specified workspace, repository used to store package of app").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Param(webservice.QueryParameter("validate", "Validate repository")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateRepoResponse{}).
Reads(openpitrix2.CreateRepoRequest{}))
webservice.Route(webservice.POST("/workspaces/{workspace}/repos"). webservice.Route(webservice.POST("/workspaces/{workspace}/repos").
To(handler.CreateRepo). To(handler.CreateRepo).
Doc("Create repository in the specified workspace, repository used to store package of app"). Doc("Create repository in the specified workspace, repository used to store package of app").
@@ -359,12 +423,26 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Param(webservice.QueryParameter("validate", "Validate repository")). Param(webservice.QueryParameter("validate", "Validate repository")).
Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateRepoResponse{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.CreateRepoResponse{}).
Reads(openpitrix2.CreateRepoRequest{})) Reads(openpitrix2.CreateRepoRequest{}))
webservice.Route(webservice.DELETE("/repos/{repo}").
To(handler.DeleteRepo).
Doc("Delete the specified repository in the specified workspace").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.DELETE("/workspaces/{workspace}/repos/{repo}"). webservice.Route(webservice.DELETE("/workspaces/{workspace}/repos/{repo}").
To(handler.DeleteRepo). To(handler.DeleteRepo).
Doc("Delete the specified repository in the specified workspace"). Doc("Delete the specified repository in the specified workspace").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id"))) Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.PATCH("/repos/{repo}").
Consumes(mimePatch...).
To(handler.ModifyRepo).
Doc("Patch the specified repository in the specified workspace").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Reads(openpitrix2.ModifyRepoRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.PATCH("/workspaces/{workspace}/repos/{repo}"). webservice.Route(webservice.PATCH("/workspaces/{workspace}/repos/{repo}").
Consumes(mimePatch...). Consumes(mimePatch...).
To(handler.ModifyRepo). To(handler.ModifyRepo).
@@ -373,12 +451,31 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Reads(openpitrix2.ModifyRepoRequest{}). Reads(openpitrix2.ModifyRepoRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id"))) Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.GET("/repos/{repo}").
To(handler.DescribeRepo).
Doc("Describe the specified repository in the specified workspace").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, openpitrix2.Repo{}).
Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.GET("/workspaces/{workspace}/repos/{repo}"). webservice.Route(webservice.GET("/workspaces/{workspace}/repos/{repo}").
To(handler.DescribeRepo). To(handler.DescribeRepo).
Doc("Describe the specified repository in the specified workspace"). Doc("Describe the specified repository in the specified workspace").
Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}).
Returns(http.StatusOK, api.StatusOK, openpitrix2.Repo{}). Returns(http.StatusOK, api.StatusOK, openpitrix2.Repo{}).
Param(webservice.PathParameter("repo", "repo id"))) Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.GET("/repos").
To(handler.ListRepos).
Doc("List repositories in the specified workspace").
Param(webservice.QueryParameter(params.ConditionsParam, "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a").
Required(false).
DataFormat("key=%s,key~%s")).
Param(webservice.QueryParameter(params.PagingParam, "paging query, e.g. limit=100,page=1").
Required(false).
DataFormat("limit=%d,page=%d").
DefaultValue("limit=10,page=1")).
Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")).
Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")).
Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}))
webservice.Route(webservice.GET("/workspaces/{workspace}/repos"). webservice.Route(webservice.GET("/workspaces/{workspace}/repos").
To(handler.ListRepos). To(handler.ListRepos).
Doc("List repositories in the specified workspace"). Doc("List repositories in the specified workspace").
@@ -393,13 +490,23 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op
Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")).
Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}))
webservice.Route(webservice.POST("/repos/{repo}/action").
To(handler.DoRepoAction).
Doc("Start index repository event").
Reads(openpitrix2.RepoActionRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.POST("/workspaces/{workspace}/repos/{repo}/action"). webservice.Route(webservice.POST("/workspaces/{workspace}/repos/{repo}/action").
To(handler.DoRepoAction). To(handler.DoRepoAction).
Doc("Start index repository event"). Doc("Start index repository event").
Reads(openpitrix2.RepoActionRequest{}). Reads(openpitrix2.RepoActionRequest{}).
Returns(http.StatusOK, api.StatusOK, errors.Error{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}).
Param(webservice.PathParameter("repo", "repo id"))) Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.GET("/repos/{repo}/events").
To(handler.ListRepoEvents).
Doc("Get repository events").
Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}).
Param(webservice.PathParameter("repo", "repo id")))
webservice.Route(webservice.GET("/workspaces/{workspace}/repos/{repo}/events"). webservice.Route(webservice.GET("/workspaces/{workspace}/repos/{repo}/events").
To(handler.ListRepoEvents). To(handler.ListRepoEvents).
Doc("Get repository events"). Doc("Get repository events").

View File

@@ -507,16 +507,16 @@ func (c *appTemplateOperator) GetAppVersionFiles(versionId string, request *GetA
func (c *appTemplateOperator) ListAppVersionAudits(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) { func (c *appTemplateOperator) ListAppVersionAudits(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) {
describeAppVersionAudits := &pb.DescribeAppVersionAuditsRequest{} describeAppVersionAudits := &pb.DescribeAppVersionAuditsRequest{}
if keyword := conditions.Match["keyword"]; keyword != "" { if keyword := conditions.Match[Keyword]; keyword != "" {
describeAppVersionAudits.SearchWord = &wrappers.StringValue{Value: keyword} describeAppVersionAudits.SearchWord = &wrappers.StringValue{Value: keyword}
} }
if appId := conditions.Match[AppId]; appId != "" { if appId := conditions.Match[AppId]; appId != "" {
describeAppVersionAudits.AppId = []string{appId} describeAppVersionAudits.AppId = []string{appId}
} }
if versionId := conditions.Match["version"]; versionId != "" { if versionId := conditions.Match[VersionId]; versionId != "" {
describeAppVersionAudits.VersionId = []string{versionId} describeAppVersionAudits.VersionId = []string{versionId}
} }
if status := conditions.Match["status"]; status != "" { if status := conditions.Match[Status]; status != "" {
describeAppVersionAudits.Status = strings.Split(status, "|") describeAppVersionAudits.Status = strings.Split(status, "|")
} }
if orderBy != "" { if orderBy != "" {
@@ -545,10 +545,10 @@ func (c *appTemplateOperator) ListAppVersionAudits(conditions *params.Conditions
func (c *appTemplateOperator) ListAppVersionReviews(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) { func (c *appTemplateOperator) ListAppVersionReviews(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) {
describeAppVersionReviews := &pb.DescribeAppVersionReviewsRequest{} describeAppVersionReviews := &pb.DescribeAppVersionReviewsRequest{}
if keyword := conditions.Match["keyword"]; keyword != "" { if keyword := conditions.Match[Keyword]; keyword != "" {
describeAppVersionReviews.SearchWord = &wrappers.StringValue{Value: keyword} describeAppVersionReviews.SearchWord = &wrappers.StringValue{Value: keyword}
} }
if status := conditions.Match["status"]; status != "" { if status := conditions.Match[Status]; status != "" {
describeAppVersionReviews.Status = strings.Split(status, "|") describeAppVersionReviews.Status = strings.Split(status, "|")
} }
if orderBy != "" { if orderBy != "" {
@@ -578,13 +578,13 @@ func (c *appTemplateOperator) ListAppVersionReviews(conditions *params.Condition
func (c *appTemplateOperator) ListAppVersions(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) { func (c *appTemplateOperator) ListAppVersions(conditions *params.Conditions, orderBy string, reverse bool, limit, offset int) (*models.PageableResponse, error) {
describeAppVersionsRequest := &pb.DescribeAppVersionsRequest{} describeAppVersionsRequest := &pb.DescribeAppVersionsRequest{}
if keyword := conditions.Match["keyword"]; keyword != "" { if keyword := conditions.Match[Keyword]; keyword != "" {
describeAppVersionsRequest.SearchWord = &wrappers.StringValue{Value: keyword} describeAppVersionsRequest.SearchWord = &wrappers.StringValue{Value: keyword}
} }
if appId := conditions.Match[AppId]; appId != "" { if appId := conditions.Match[AppId]; appId != "" {
describeAppVersionsRequest.AppId = []string{appId} describeAppVersionsRequest.AppId = []string{appId}
} }
if status := conditions.Match["status"]; status != "" { if status := conditions.Match[Status]; status != "" {
describeAppVersionsRequest.Status = strings.Split(status, "|") describeAppVersionsRequest.Status = strings.Split(status, "|")
} }
if orderBy != "" { if orderBy != "" {