mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
fix:coerce
This commit is contained in:
@@ -8,9 +8,9 @@ import { ContextMode, createContext } from '@/onebot/action/msg/SendMsg';
|
||||
import { z } from 'zod';
|
||||
|
||||
const SchemaData = z.object({
|
||||
user_id: z.union([z.number(), z.string()]),
|
||||
file: z.string(),
|
||||
name: z.string(),
|
||||
user_id: z.union([z.coerce.number(), z.coerce.string()]),
|
||||
file: z.coerce.string(),
|
||||
name: z.coerce.string(),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
|
||||
Reference in New Issue
Block a user