mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fmt
This commit is contained in:
parent
7687d3dd7d
commit
64fa718802
1 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ export const adminUpdatePolicyController: AppController = async (c) => {
|
||||||
const parsed = PolicySpecSchema.parse(req);
|
const parsed = PolicySpecSchema.parse(req);
|
||||||
|
|
||||||
// Validate each policy against its specific schema
|
// Validate each policy against its specific schema
|
||||||
const invalidPolicies = parsed.policies.filter(policy => {
|
const invalidPolicies = parsed.policies.filter((policy) => {
|
||||||
const policyItem = policyRegistry.available[policy.name];
|
const policyItem = policyRegistry.available[policy.name];
|
||||||
// If policy not found in registry, it's invalid
|
// If policy not found in registry, it's invalid
|
||||||
if (!policyItem) {
|
if (!policyItem) {
|
||||||
|
|
@ -71,7 +71,7 @@ export const adminUpdatePolicyController: AppController = async (c) => {
|
||||||
// If any policies are invalid, return an error
|
// If any policies are invalid, return an error
|
||||||
if (invalidPolicies.length > 0) {
|
if (invalidPolicies.length > 0) {
|
||||||
return c.json({
|
return c.json({
|
||||||
error: `Invalid policy specification for: ${invalidPolicies.map(p => p.name).join(', ')}`
|
error: `Invalid policy specification for: ${invalidPolicies.map((p) => p.name).join(', ')}`,
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue