Resources added to oc-catalog + proto search
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user