(ctx context.Context, rep repo.DirectRepositoryWriter)
| 23 | } |
| 24 | |
| 25 | func (c *commandContentDelete) run(ctx context.Context, rep repo.DirectRepositoryWriter) error { |
| 26 | c.svc.dangerousCommand() |
| 27 | |
| 28 | contentIDs, err := toContentIDs(c.ids) |
| 29 | if err != nil { |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | for _, contentID := range contentIDs { |
| 34 | if err := rep.ContentManager().DeleteContent(ctx, contentID); err != nil { |
| 35 | return errors.Wrapf(err, "error deleting content %v", contentID) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | return nil |
| 40 | } |
nothing calls this directly
no test coverage detected