rename "policy" to "spec"

This commit is contained in:
Siddharth Singh 2025-03-30 14:24:59 +05:30
parent 5e98bc65c0
commit 7715d53ad5
No known key found for this signature in database

View file

@ -1,5 +1,5 @@
import { type AppController } from '@/app.ts'; import { type AppController } from '@/app.ts';
import { DEFAULT_POLICIES, policyRegistry } from "@/utils/policies.ts"; import { DEFAULT_POLICY_SPEC, policyRegistry } from "@/utils/policies.ts";
export const adminListPoliciesController: AppController = (c) => { export const adminListPoliciesController: AppController = (c) => {
return c.json(Object.entries(policyRegistry.available) return c.json(Object.entries(policyRegistry.available)
@ -21,6 +21,6 @@ export const adminCurrentPolicyController: AppController = async (c) => {
kinds: [11984] kinds: [11984]
}]).then(events => events[0]); }]).then(events => events[0]);
if (current) return c.json({ mode: conf.policyMode, policies: current }); if (current) return c.json({ mode: conf.policyMode, spec: current });
return c.json({ mode: conf.policyMode, policies: DEFAULT_POLICIES }); return c.json({ mode: conf.policyMode, spec: DEFAULT_POLICY_SPEC });
} }