mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
send default spec in policy worker
This commit is contained in:
parent
e947e6d3f4
commit
b613334312
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { type AppController } from '@/app.ts';
|
||||
import { createPolicyEvent } from '@/utils/policies/mod.ts';
|
||||
import { createPolicyEvent, DEFAULT_POLICY_SPEC } from '@/utils/policies/mod.ts';
|
||||
import { policyRegistry } from '@/utils/policies/mod.ts';
|
||||
import { z } from 'zod';
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export const adminCurrentPolicyController: AppController = async (c) => {
|
|||
}]).then((events) => events[0]);
|
||||
|
||||
if (current) return c.json({ spec: JSON.parse(current.content) });
|
||||
return c.json({ spec: { policies: [] } });
|
||||
return c.json({ spec: { policies: DEFAULT_POLICY_SPEC } });
|
||||
};
|
||||
|
||||
const PolicySpecSchema = z.object({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue