fix(admin): declare users route runtime locally
Staging Backend Quality Gate / validate (pull_request) Successful in 19m9s
Staging Backend Quality Gate / publish (pull_request) Has been skipped

This commit is contained in:
Jesse
2026-08-06 21:17:19 +08:00
parent ec0a8c3c39
commit 015f1e501e
3 changed files with 23 additions and 3 deletions
+3 -1
View File
@@ -1 +1,3 @@
export { DELETE, GET, PATCH, POST, PUT, runtime } from "../customers/route";
export const runtime = "nodejs";
export { DELETE, GET, PATCH, POST, PUT } from "../customers/route";
+4 -2
View File
@@ -38,6 +38,8 @@ test("admin_users migration is service-role-only and auditable", () => {
assert.match(migration, /grant select, insert, update on table public\.admin_users to service_role/);
});
test("legacy admin users route aliases the guarded customer resource", () => {
assert.match(usersSource, /export \{ DELETE, GET, PATCH, POST, PUT, runtime \} from "\.\.\/customers\/route"/);
test("legacy admin users route aliases handlers but declares runtime statically", () => {
assert.match(usersSource, /export const runtime = "nodejs"/);
assert.match(usersSource, /export \{ DELETE, GET, PATCH, POST, PUT \} from "\.\.\/customers\/route"/);
assert.doesNotMatch(usersSource, /export \{[^}]*runtime[^}]*\} from/);
});