(ctx context.Context, objID uint)
| 57 | } |
| 58 | |
| 59 | func (r *Runner) DeleteFileObject(ctx context.Context, objID uint) error { |
| 60 | if !auth.IsAdmin(ctx) { |
| 61 | return runnerErrors.ErrUnauthorized |
| 62 | } |
| 63 | |
| 64 | if err := r.store.DeleteFileObject(ctx, objID); err != nil { |
| 65 | if errors.Is(err, runnerErrors.ErrNotFound) { |
| 66 | return nil |
| 67 | } |
| 68 | return fmt.Errorf("failed to delete file object: %w", err) |
| 69 | } |
| 70 | return nil |
| 71 | } |
| 72 | |
| 73 | func (r *Runner) DeleteFileObjectsByTags(ctx context.Context, tags []string) (int64, error) { |
| 74 | if !auth.IsAdmin(ctx) { |
nothing calls this directly
no test coverage detected