(
input: RenameArtifactInput,
)
| 4130 | }); |
| 4131 | |
| 4132 | const artifactsRename = ( |
| 4133 | input: RenameArtifactInput, |
| 4134 | ): Effect.Effect<Artifact, ArtifactNotFoundError | StorageFailure> => |
| 4135 | Effect.gen(function* () { |
| 4136 | const where = artifactById(input.id); |
| 4137 | const existing = yield* core.findFirst("artifact", { where }); |
| 4138 | if (!existing) { |
| 4139 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4140 | } |
| 4141 | const set = { title: input.title, updated_at: new Date() }; |
| 4142 | yield* core.updateMany("artifact", { where, set }); |
| 4143 | return rowToArtifact({ ...existing, ...set }); |
| 4144 | }); |
| 4145 | |
| 4146 | // Hard delete: an artifact is not a connection, so there is no disabled or |
| 4147 | // archived state to fall back to. |
nothing calls this directly
no test coverage detected