(ctx context.Context, objID uint)
| 44 | } |
| 45 | |
| 46 | func (r *Runner) GetFileObject(ctx context.Context, objID uint) (params.FileObject, error) { |
| 47 | if !auth.IsAdmin(ctx) { |
| 48 | return params.FileObject{}, runnerErrors.ErrUnauthorized |
| 49 | } |
| 50 | |
| 51 | fileObj, err := r.store.GetFileObject(ctx, objID) |
| 52 | if err != nil { |
| 53 | return params.FileObject{}, fmt.Errorf("failed to get file object: %w", err) |
| 54 | } |
| 55 | |
| 56 | return fileObj, nil |
| 57 | } |
| 58 | |
| 59 | func (r *Runner) DeleteFileObject(ctx context.Context, objID uint) error { |
| 60 | if !auth.IsAdmin(ctx) { |
nothing calls this directly
no test coverage detected