(
input: SetArtifactPreviewInput,
)
| 4852 | * looked at is not an edit. |
| 4853 | */ |
| 4854 | const artifactsSetPreview = ( |
| 4855 | input: SetArtifactPreviewInput, |
| 4856 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4857 | Effect.gen(function* () { |
| 4858 | const where = artifactById(input.id); |
| 4859 | const existing = yield* core.findFirst("artifact", { where }); |
| 4860 | if (!existing) { |
| 4861 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4862 | } |
| 4863 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4864 | }); |
| 4865 | |
| 4866 | const artifactsRename = ( |
| 4867 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected