| 451 | } |
| 452 | |
| 453 | func (i *imlServiceController) Swagger(ctx *gin.Context) { |
| 454 | id, has := ctx.Params.Get("id") |
| 455 | if !has { |
| 456 | ctx.JSON(200, &pm3.Response{ |
| 457 | Code: -1, |
| 458 | Success: "fail", |
| 459 | Message: fmt.Sprintf("id is required"), |
| 460 | }) |
| 461 | return |
| 462 | } |
| 463 | tmp, err := i.swagger(ctx, id) |
| 464 | if err != nil { |
| 465 | ctx.JSON(200, &pm3.Response{ |
| 466 | Code: -1, |
| 467 | Success: "fail", |
| 468 | Message: err.Error(), |
| 469 | }) |
| 470 | return |
| 471 | } |
| 472 | ctx.JSON(200, tmp) |
| 473 | return |
| 474 | } |
| 475 | |
| 476 | func (i *imlServiceController) Simple(ctx *gin.Context) ([]*service_dto.SimpleServiceItem, error) { |
| 477 | return i.module.Simple(ctx) |