(
input: RenameArtifactInput,
)
| 6304 | }); |
| 6305 | |
| 6306 | const artifactsRename = ( |
| 6307 | input: RenameArtifactInput, |
| 6308 | ): Effect.Effect<Artifact, ArtifactNotFoundError | StorageFailure> => |
| 6309 | Effect.gen(function* () { |
| 6310 | const where = artifactById(input.id); |
| 6311 | const existing = yield* core.findFirst("artifact", { where }); |
| 6312 | if (!existing) { |
| 6313 | return yield* new ArtifactNotFoundError({ |
| 6314 | id: ArtifactId.make(input.id), |
| 6315 | }); |
| 6316 | } |
| 6317 | const set = { title: input.title, updated_at: new Date() }; |
| 6318 | yield* core.updateMany("artifact", { where, set }); |
| 6319 | return rowToArtifact({ ...existing, ...set }); |
| 6320 | }); |
| 6321 | |
| 6322 | // Hard delete: an artifact is not a connection, so there is no disabled or |
| 6323 | // archived state to fall back to. |
nothing calls this directly
no test coverage detected