(
input: SetArtifactPreviewInput,
)
| 6195 | * looked at is not an edit. |
| 6196 | */ |
| 6197 | const artifactsSetPreview = ( |
| 6198 | input: SetArtifactPreviewInput, |
| 6199 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 6200 | Effect.gen(function* () { |
| 6201 | const where = artifactById(input.id); |
| 6202 | const existing = yield* core.findFirst("artifact", { where }); |
| 6203 | if (!existing) { |
| 6204 | return yield* new ArtifactNotFoundError({ |
| 6205 | id: ArtifactId.make(input.id), |
| 6206 | }); |
| 6207 | } |
| 6208 | yield* core.updateMany("artifact", { |
| 6209 | where, |
| 6210 | set: { preview: input.preview }, |
| 6211 | }); |
| 6212 | }); |
| 6213 | |
| 6214 | const artifactsRename = ( |
| 6215 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected