(
input: SetArtifactPreviewInput,
)
| 4144 | * looked at is not an edit. |
| 4145 | */ |
| 4146 | const artifactsSetPreview = ( |
| 4147 | input: SetArtifactPreviewInput, |
| 4148 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4149 | Effect.gen(function* () { |
| 4150 | const where = artifactById(input.id); |
| 4151 | const existing = yield* core.findFirst("artifact", { where }); |
| 4152 | if (!existing) { |
| 4153 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4154 | } |
| 4155 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4156 | }); |
| 4157 | |
| 4158 | const artifactsRename = ( |
| 4159 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected