| 390 | } |
| 391 | |
| 392 | func (i *imlDynamicModule) Delete(ctx context.Context, module string, ids []string) error { |
| 393 | return i.transaction.Transaction(ctx, func(ctx context.Context) error { |
| 394 | for _, id := range ids { |
| 395 | id = strings.ToLower(fmt.Sprintf("%s_%s", id, module)) |
| 396 | _, err := i.get(ctx, module, id) |
| 397 | if err != nil { |
| 398 | return err |
| 399 | } |
| 400 | err = i.dynamicModuleService.Delete(ctx, id) |
| 401 | if err != nil { |
| 402 | return err |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | return nil |
| 407 | }) |
| 408 | |
| 409 | } |
| 410 | |
| 411 | func (i *imlDynamicModule) Get(ctx context.Context, module string, id string) (*dynamic_module_dto.DynamicModule, error) { |
| 412 | suffix := fmt.Sprintf("_%s", module) |