(ctx context.Context, id string, input *system_apikey_dto.Update)
| 225 | } |
| 226 | |
| 227 | func (i *imlAPIKeyModule) Update(ctx context.Context, id string, input *system_apikey_dto.Update) error { |
| 228 | return i.transaction.Transaction(ctx, func(ctx context.Context) error { |
| 229 | err := i.apikeyService.Save(ctx, id, &system_apikey.Update{ |
| 230 | Name: input.Name, |
| 231 | Value: input.Value, |
| 232 | Expired: input.Expired, |
| 233 | }) |
| 234 | if err != nil { |
| 235 | return err |
| 236 | } |
| 237 | client, err := i.clusterServer.GatewayClient(ctx, cluster.DefaultClusterID) |
| 238 | if err != nil { |
| 239 | return err |
| 240 | } |
| 241 | return i.online(ctx, client) |
| 242 | }) |
| 243 | } |
| 244 | |
| 245 | func (i *imlAPIKeyModule) Delete(ctx context.Context, id string) error { |
| 246 | return i.transaction.Transaction(ctx, func(ctx context.Context) error { |
nothing calls this directly
no test coverage detected