(
input: SetArtifactPreviewInput,
)
| 4031 | * looked at is not an edit. |
| 4032 | */ |
| 4033 | const artifactsSetPreview = ( |
| 4034 | input: SetArtifactPreviewInput, |
| 4035 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4036 | Effect.gen(function* () { |
| 4037 | const where = artifactById(input.id); |
| 4038 | const existing = yield* core.findFirst("artifact", { where }); |
| 4039 | if (!existing) { |
| 4040 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4041 | } |
| 4042 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4043 | }); |
| 4044 | |
| 4045 | const artifactsRename = ( |
| 4046 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected