chore: run a full eslint

This commit is contained in:
Wesley F. Young
2024-08-10 19:58:31 +08:00
parent 5a5257294b
commit 87c3b24488
198 changed files with 8187 additions and 7744 deletions

View File

@@ -1,16 +1,15 @@
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { NTQQFriendApi } from '@/core/apis/friend';
const SchemaData = {
type: 'object',
properties: {
flag: { type: 'string' },
approve: { type: ['string', 'boolean'] },
remark: { type: 'string' }
remark: { type: 'string' },
},
required: ['flag']
required: ['flag'],
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
@@ -18,6 +17,7 @@ type Payload = FromSchema<typeof SchemaData>;
export default class SetFriendAddRequest extends BaseAction<Payload, null> {
actionName = ActionName.SetFriendAddRequest;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload): Promise<null> {
const NTQQFriendApi = this.CoreContext.getApiContext().FriendApi;
const approve = payload.approve?.toString() !== 'false';