(
input: SetArtifactPreviewInput,
)
| 4118 | * looked at is not an edit. |
| 4119 | */ |
| 4120 | const artifactsSetPreview = ( |
| 4121 | input: SetArtifactPreviewInput, |
| 4122 | ): Effect.Effect<void, ArtifactNotFoundError | StorageFailure> => |
| 4123 | Effect.gen(function* () { |
| 4124 | const where = artifactById(input.id); |
| 4125 | const existing = yield* core.findFirst("artifact", { where }); |
| 4126 | if (!existing) { |
| 4127 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4128 | } |
| 4129 | yield* core.updateMany("artifact", { where, set: { preview: input.preview } }); |
| 4130 | }); |
| 4131 | |
| 4132 | const artifactsRename = ( |
| 4133 | input: RenameArtifactInput, |
nothing calls this directly
no test coverage detected