fix: zod boolean强制转换
This commit is contained in:
1 parent
30a48f1693
commit
db37def059
88 files changed
+377
-331
No files matched your search
@@ -2,10 +2,10 @@ import { type NTQQCollectionApi } from '@/core/apis/collection';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { actionType } from '../type';
|
||||
const SchemaData = z.object({
|
||||
category: z.coerce.number(),
|
||||
count: z.coerce.number().default(1),
|
||||
category: actionType.number(),
|
||||
count: actionType.number().default(1),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
Reference in new issue
Block a user