(
input: SetArtifactPreviewInput,
)
| 6287 | * looked at is not an edit. |
| 6288 | */ |
| 6289 | const artifactsSetPreview = ( |
| 6290 | input: SetArtifactPreviewInput, |
| 6291 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 6292 | Effect.gen(function* () { |
| 6293 | const where = artifactById(input.id); |
| 6294 | const existing = yield* core.findFirst("artifact", { where }); |
| 6295 | if (!existing) { |
| 6296 | return yield* new ArtifactNotFoundError({ |
| 6297 | id: ArtifactId.make(input.id), |
| 6298 | }); |
| 6299 | } |
| 6300 | yield* core.updateMany("artifact", { |
| 6301 | where, |
| 6302 | set: { preview: input.preview }, |
| 6303 | }); |
| 6304 | }); |
| 6305 | |
| 6306 | const artifactsRename = ( |
| 6307 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected