mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 21:10:23 +00:00
fix: zod boolean强制转换
This commit is contained in:
@@ -3,11 +3,12 @@ import { OB11Construct } from '@/onebot/helper/data';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string(),
|
||||
user_id: z.coerce.string(),
|
||||
no_cache: z.coerce.boolean().default(false),
|
||||
group_id: actionType.string(),
|
||||
user_id: actionType.string(),
|
||||
no_cache: actionType.boolean().default(false),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
Reference in New Issue
Block a user