fix
This commit is contained in:
1 parent
54e6d5c3f2
commit
41dccd98a9
88 files changed
+363
-363
No files matched your search
@@ -2,11 +2,11 @@ import { GeneralCallResult } from '@/core';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '@/common/coerce';
|
||||
import { coerce } from '@/common/coerce';
|
||||
const SchemaData = z.object({
|
||||
user_id: actionType.string().optional(),
|
||||
group_id: actionType.string().optional(),
|
||||
phoneNumber: actionType.string().default(''),
|
||||
user_id: coerce.string().optional(),
|
||||
group_id: coerce.string().optional(),
|
||||
phoneNumber: coerce.string().default(''),
|
||||
});
|
||||
|
||||
type Payload = z.infer<typeof SchemaData>;
|
||||
@@ -29,7 +29,7 @@ export class SharePeer extends OneBotAction<Payload, GeneralCallResult & {
|
||||
}
|
||||
|
||||
const SchemaDataGroupEx = z.object({
|
||||
group_id: actionType.string(),
|
||||
group_id: coerce.string(),
|
||||
});
|
||||
|
||||
type PayloadGroupEx = z.infer<typeof SchemaDataGroupEx>;
|
||||
|
||||
Reference in new issue
Block a user