fix currentPolicyController schema error

This commit is contained in:
Siddharth Singh 2025-03-31 20:31:00 +05:30
parent a64075b3eb
commit f2a1968874
No known key found for this signature in database
3 changed files with 273 additions and 1445 deletions

View file

@ -66,7 +66,7 @@
"@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0",
"@nostrify/db": "jsr:@nostrify/db@^0.39.4",
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.39.1",
"@nostrify/policies": "https://gitlab.com/soapbox-pub/nostrify/-/raw/npolicy-zod-updates/packages/policies/mod.ts",
"@nostrify/policies": "https://gitlab.com/soapbox-pub/nostrify/-/raw/58c20b3ee23d8be4987d2c0055d86960e7db763d/packages/policies/mod.ts",
"@nostrify/types": "jsr:@nostrify/types@^0.36.0",
"@scure/base": "npm:@scure/base@^1.1.6",
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",

1714
deno.lock generated

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,7 @@ export const adminCurrentPolicyController: AppController = async (c) => {
kinds: [11984],
}]).then((events) => events[0]);
if (current) return c.json({ mode: conf.policyMode, spec: current });
if (current) return c.json({ mode: conf.policyMode, spec: JSON.parse(current.content) });
await relay.event(await createPolicyEvent(conf, DEFAULT_POLICY_SPEC));
return c.json({ mode: conf.policyMode, spec: DEFAULT_POLICY_SPEC });