Fix scope restoration for promoted scripts

This commit is contained in:
2026-09-18 08:08:17 -04:00
parent 3c49437bf9
commit b2ec01daf5
4 changed files with 100 additions and 13 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ function parseId(raw: string): number | null {
}
// POST body: { scopeType: 'game' | 'map' | null, scopeValue?: string }
// Setting/changing scope on a script with a current_version_id returns a
// 409 with kind='scope-requires-beta'. Un-scoping detaches inventory so the
// Scope edits preserve the promoted version; changes during an active beta
// return 409 with kind='has-active-beta'. Un-scoping detaches inventory so the
// orphaned files show up as drift on the deployments page for the operator
// to reconcile manually — the same flow as any other drift.
export async function POST({ params, request }: { params: { id: string }; request: Request }) {