(
input: RenameArtifactInput,
)
| 5594 | }); |
| 5595 | |
| 5596 | const artifactsRename = ( |
| 5597 | input: RenameArtifactInput, |
| 5598 | ): Effect.Effect<Artifact, ArtifactNotFoundError | StorageFailure> => |
| 5599 | Effect.gen(function* () { |
| 5600 | const where = artifactById(input.id); |
| 5601 | const existing = yield* core.findFirst("artifact", { where }); |
| 5602 | if (!existing) { |
| 5603 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 5604 | } |
| 5605 | const set = { title: input.title, updated_at: new Date() }; |
| 5606 | yield* core.updateMany("artifact", { where, set }); |
| 5607 | return rowToArtifact({ ...existing, ...set }); |
| 5608 | }); |
| 5609 | |
| 5610 | // Hard delete: an artifact is not a connection, so there is no disabled or |
| 5611 | // archived state to fall back to. |
nothing calls this directly
no test coverage detected