mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix currentPolicyController schema error
This commit is contained in:
parent
a64075b3eb
commit
f2a1968874
3 changed files with 273 additions and 1445 deletions
|
|
@ -66,7 +66,7 @@
|
||||||
"@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0",
|
"@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0",
|
||||||
"@nostrify/db": "jsr:@nostrify/db@^0.39.4",
|
"@nostrify/db": "jsr:@nostrify/db@^0.39.4",
|
||||||
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.39.1",
|
"@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",
|
"@nostrify/types": "jsr:@nostrify/types@^0.36.0",
|
||||||
"@scure/base": "npm:@scure/base@^1.1.6",
|
"@scure/base": "npm:@scure/base@^1.1.6",
|
||||||
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
|
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ 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, spec: current });
|
if (current) return c.json({ mode: conf.policyMode, spec: JSON.parse(current.content) });
|
||||||
|
|
||||||
await relay.event(await createPolicyEvent(conf, DEFAULT_POLICY_SPEC));
|
await relay.event(await createPolicyEvent(conf, DEFAULT_POLICY_SPEC));
|
||||||
return c.json({ mode: conf.policyMode, spec: DEFAULT_POLICY_SPEC });
|
return c.json({ mode: conf.policyMode, spec: DEFAULT_POLICY_SPEC });
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue