feat: rename orbits; snapshots and downloads show the orbit's current name
PUT /api/v1/orbits/:id changes only the name (admin, validated, case-insensitively unique, audited). Snapshot metadata is immutable, so the list and the download file name look the orbit up by id and fall back to the written name only when the orbit is gone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -337,7 +337,8 @@ fn recipe(w: &World, row: &Row) -> (String, Option<Value>) {
|
||||
| "/api/v1/snapshots/:id/download"
|
||||
| "/api/v1/snapshots/:id/restore-targets"
|
||||
| "/api/v1/snapshots/:id/restore-jobs" => a.snapshot,
|
||||
"/api/v1/orbits/:id/retention"
|
||||
"/api/v1/orbits/:id"
|
||||
| "/api/v1/orbits/:id/retention"
|
||||
| "/api/v1/orbits/:id/run"
|
||||
| "/api/v1/orbits/:id/outpost" => a.orbit,
|
||||
"/api/v1/capture-profiles/:id"
|
||||
@@ -374,6 +375,7 @@ fn recipe(w: &World, row: &Row) -> (String, Option<Value>) {
|
||||
("POST", "/api/v1/orbits") => Some(
|
||||
json!({"name": "created", "provider": "filesystem", "source": "filesystem", "provider_config": {"path": "/nonexistent"}}),
|
||||
),
|
||||
("PUT", "/api/v1/orbits/:id") => Some(json!({"name": "renamed-orbit"})),
|
||||
("PUT", "/api/v1/restore-targets/:id") => Some(json!({"name": "renamed"})),
|
||||
("PUT", "/api/v1/orbits/:id/retention") => Some(json!({"decay_preset": "week-of-dailies"})),
|
||||
("PUT", "/api/v1/orbits/:id/outpost") => Some(json!({"outpost_id": a.outpost})),
|
||||
|
||||
Reference in New Issue
Block a user