This commit is contained in:
mr 2024-08-26 13:50:11 +02:00
parent b94f6c4ddf
commit 0815f8bd58
5 changed files with 55 additions and 3 deletions

View File

@ -167,12 +167,12 @@ func (o *SharedWorkspaceController) AddPeer() {
o.ServeJSON()
}
// @Title Add Peer
// @Title Add Rule
// @Description find shared workspace by id
// @Param id path string true "the id you want to get"
// @Param id2 path string true "the id you want to add"
// @Success 200 {shared workspace} models.shared_workspace
// @router /:id/peer/:id2 [post]
// @router /:id/rule/:id2 [post]
func (o *SharedWorkspaceController) AddRule() {
var res map[string]interface{}
id := o.Ctx.Input.Param(":id")

BIN
oc-shared

Binary file not shown.

View File

@ -118,7 +118,7 @@ func init() {
beego.GlobalControllerRouter["oc-shared/controllers:SharedWorkspaceController"] = append(beego.GlobalControllerRouter["oc-shared/controllers:SharedWorkspaceController"],
beego.ControllerComments{
Method: "AddRule",
Router: `/:id/peer/:id2`,
Router: `/:id/rule/:id2`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,

View File

@ -313,6 +313,36 @@
}
}
},
"/shared/workspace/{id}/rule/{id2}": {
"post": {
"tags": [
"shared/workspace"
],
"description": "find shared workspace by id\n\u003cbr\u003e",
"operationId": "SharedWorkspaceController.Add Rule",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the id you want to get",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "id2",
"description": "the id you want to add",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{shared workspace} models.shared_workspace"
}
}
}
},
"/shared/workspace/{id}/workflow/{id2}": {
"post": {
"tags": [

View File

@ -117,6 +117,28 @@ paths:
responses:
"200":
description: '{shared workspace} models.shared_workspace'
/shared/workspace/{id}/rule/{id2}:
post:
tags:
- shared/workspace
description: |-
find shared workspace by id
<br>
operationId: SharedWorkspaceController.Add Rule
parameters:
- in: path
name: id
description: the id you want to get
required: true
type: string
- in: path
name: id2
description: the id you want to add
required: true
type: string
responses:
"200":
description: '{shared workspace} models.shared_workspace'
/shared/workspace/{id}/workflow/{id2}:
post:
tags: