(
input: SetArtifactPreviewInput,
)
| 4190 | * looked at is not an edit. |
| 4191 | */ |
| 4192 | const artifactsSetPreview = ( |
| 4193 | input: SetArtifactPreviewInput, |
| 4194 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4195 | Effect.gen(function* () { |
| 4196 | const where = artifactById(input.id); |
| 4197 | const existing = yield* core.findFirst("artifact", { where }); |
| 4198 | if (!existing) { |
| 4199 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4200 | } |
| 4201 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4202 | }); |
| 4203 | |
| 4204 | const artifactsRename = ( |
| 4205 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected