(ctx context.Context, appId string)
| 1413 | } |
| 1414 | |
| 1415 | func (i *imlAppModule) DeleteApp(ctx context.Context, appId string) error { |
| 1416 | info, err := i.serviceService.Get(ctx, appId) |
| 1417 | if err != nil { |
| 1418 | if !errors.Is(err, gorm.ErrRecordNotFound) { |
| 1419 | return err |
| 1420 | } |
| 1421 | return nil |
| 1422 | } |
| 1423 | if !info.AsApp { |
| 1424 | return errors.New("not app, can not delete") |
| 1425 | } |
| 1426 | |
| 1427 | return i.serviceService.Delete(ctx, appId) |
| 1428 | } |