(
input: RenameArtifactInput,
)
| 4202 | }); |
| 4203 | |
| 4204 | const artifactsRename = ( |
| 4205 | input: RenameArtifactInput, |
| 4206 | ): Effect.Effect<Artifact, ArtifactNotFoundError | StorageFailure> => |
| 4207 | Effect.gen(function* () { |
| 4208 | const where = artifactById(input.id); |
| 4209 | const existing = yield* core.findFirst("artifact", { where }); |
| 4210 | if (!existing) { |
| 4211 | return yield* new ArtifactNotFoundError({ id: ArtifactId.make(input.id) }); |
| 4212 | } |
| 4213 | const set = { title: input.title, updated_at: new Date() }; |
| 4214 | yield* core.updateMany("artifact", { where, set }); |
| 4215 | return rowToArtifact({ ...existing, ...set }); |
| 4216 | }); |
| 4217 | |
| 4218 | // Hard delete: an artifact is not a connection, so there is no disabled or |
| 4219 | // archived state to fall back to. |
nothing calls this directly
no test coverage detected