(
input: SetArtifactPreviewInput,
)
| 4574 | * looked at is not an edit. |
| 4575 | */ |
| 4576 | const artifactsSetPreview = ( |
| 4577 | input: SetArtifactPreviewInput, |
| 4578 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4579 | Effect.gen(function* () { |
| 4580 | const where = artifactById(input.id); |
| 4581 | const existing = yield* core.findFirst("artifact", { where }); |
| 4582 | if (!existing) { |
| 4583 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4584 | } |
| 4585 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4586 | }); |
| 4587 | |
| 4588 | const artifactsRename = ( |
| 4589 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected