fix(admin): declare users route runtime locally
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user