UpdateApi 更新API信息
(ctx context.Context, api *domain.Api)
| 51 | |
| 52 | // UpdateApi 更新API信息 |
| 53 | func (a *apiService) UpdateApi(ctx context.Context, api *domain.Api) error { |
| 54 | if api == nil { |
| 55 | a.l.Warn("API不能为空") |
| 56 | return errors.New("api不能为空") |
| 57 | } |
| 58 | |
| 59 | return a.repo.UpdateApi(ctx, api) |
| 60 | } |
| 61 | |
| 62 | // DeleteApi 删除指定ID的API |
| 63 | func (a *apiService) DeleteApi(ctx context.Context, id int) error { |