Resources added to oc-catalog + proto search

This commit is contained in:
mr
2024-07-26 14:39:57 +02:00
parent 053c1ddf31
commit 0fbe14686a
13 changed files with 579 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
// Operations about data
// Operations about workflow
type WorkflowController struct {
beego.Controller
}
@@ -27,6 +27,17 @@ func (o *WorkflowController) Put() {
o.ServeJSON()
}
// @Title Get
// @Description find workflow by key word
// @Param search path string true "the search you want to get"
// @Success 200 {workflow} models.workflow
// @router /:search [get]
func (o *WorkflowController) Search() {
search := o.Ctx.Input.Param(":search")
o.Data["json"] = oclib.Search(search, oclib.LibDataEnum(oclib.WORKFLOW_RESOURCE))
o.ServeJSON()
}
// @Title Create
// @Description create workflow
// @Param workflow body json true "body for workflow content (Json format)"