mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: zod boolean强制转换
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '../type';
|
||||
|
||||
const SchemaData = z.object({
|
||||
group_id: z.coerce.string().optional(),
|
||||
user_id: z.coerce.string(),
|
||||
group_id: actionType.string().optional(),
|
||||
user_id: actionType.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
Reference in New Issue
Block a user