fix:coerce

This commit is contained in:
手瓜一十雪
2025-04-15 12:25:37 +08:00
parent 6ded82d454
commit b190c21ef8
88 changed files with 277 additions and 276 deletions

View File

@@ -4,9 +4,9 @@ import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
const SchemaData = z.object({
flag: z.union([z.string(), z.number()]),
approve: z.boolean().default(true),
reason: z.union([z.string(), z.null()]).default(' '),
flag: z.union([z.coerce.string(), z.coerce.number()]),
approve: z.coerce.boolean().default(true),
reason: z.union([z.coerce.string(), z.null()]).default(' '),
});
type Payload = z.infer<typeof SchemaData>;