| 159 | } |
| 160 | |
| 161 | func (i *imlAPIController) Delete(ctx *gin.Context, serviceId string, apiId string) error { |
| 162 | return i.transaction.Transaction(ctx, func(txCtx context.Context) error { |
| 163 | err := i.routerModule.Delete(ctx, serviceId, apiId) |
| 164 | if err != nil { |
| 165 | return err |
| 166 | } |
| 167 | return i.module.Delete(ctx, serviceId, apiId) |
| 168 | }) |
| 169 | |
| 170 | } |
| 171 | |
| 172 | func (i *imlAPIController) List(ctx *gin.Context, keyword string, serviceId string) ([]*ai_api_dto.APIItem, error) { |
| 173 | return i.module.List(ctx, keyword, serviceId) |