Migrate PlantUML
This commit is contained in:
@@ -103,26 +103,6 @@ func (o *DataController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title PostPlantUML
|
||||
// @Description parse plantuml text and return the formed data resources
|
||||
// @Param body body string true "PlantUML text content"
|
||||
// @Success 200 {data} models.data
|
||||
// @Failure 406 {string} string "Bad request"
|
||||
// @router /plantuml [post]
|
||||
func (o *DataController) PostPlantUML() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
body := o.Ctx.Input.CopyBody(1000000)
|
||||
req := &tools.APIRequest{Username: user, PeerID: peerID, Groups: groups}
|
||||
wf, err := parsePlantUMLText(body, req)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{"data": nil, "code": 406, "error": err.Error()}
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
o.Data["json"] = map[string]interface{}{"data": wf.DataResources, "code": 200, "error": nil}
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Delete
|
||||
// @Description delete the data
|
||||
// @Param id path string true "The id you want to delete"
|
||||
|
||||
Reference in New Issue
Block a user