(
input: SetArtifactPreviewInput,
)
| 6076 | * looked at is not an edit. |
| 6077 | */ |
| 6078 | const artifactsSetPreview = ( |
| 6079 | input: SetArtifactPreviewInput, |
| 6080 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 6081 | Effect.gen(function* () { |
| 6082 | const where = artifactById(input.id); |
| 6083 | const existing = yield* core.findFirst("artifact", { where }); |
| 6084 | if (!existing) { |
| 6085 | return yield* new ArtifactNotFoundError({ |
| 6086 | id: ArtifactId.make(input.id), |
| 6087 | }); |
| 6088 | } |
| 6089 | yield* core.updateMany("artifact", { |
| 6090 | where, |
| 6091 | set: { preview: input.preview }, |
| 6092 | }); |
| 6093 | }); |
| 6094 | |
| 6095 | const artifactsRename = ( |
| 6096 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected