(
input: SetArtifactPreviewInput,
)
| 5582 | * looked at is not an edit. |
| 5583 | */ |
| 5584 | const artifactsSetPreview = ( |
| 5585 | input: SetArtifactPreviewInput, |
| 5586 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 5587 | Effect.gen(function* () { |
| 5588 | const where = artifactById(input.id); |
| 5589 | const existing = yield* core.findFirst("artifact", { where }); |
| 5590 | if (!existing) { |
| 5591 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 5592 | } |
| 5593 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 5594 | }); |
| 5595 | |
| 5596 | const artifactsRename = ( |
| 5597 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected