chore: run a full eslint

This commit is contained in:
Wesley F. Young
2024-08-10 19:58:31 +08:00
parent 9a9511aad6
commit 116a04e081
198 changed files with 8187 additions and 7744 deletions

View File

@@ -1,15 +1,15 @@
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { WebHonorType } from '@/core/entities';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
const SchemaData = {
type: 'object',
properties: {
group_id: { type: [ 'number' , 'string' ] },
type: { enum: [WebHonorType.ALL, WebHonorType.EMOTION, WebHonorType.LEGEND, WebHonorType.PERFORMER, WebHonorType.STRONG_NEWBIE, WebHonorType.TALKATIVE] }
group_id: { type: ['number', 'string'] },
type: { enum: [WebHonorType.ALL, WebHonorType.EMOTION, WebHonorType.LEGEND, WebHonorType.PERFORMER, WebHonorType.STRONG_NEWBIE, WebHonorType.TALKATIVE] },
},
required: ['group_id']
required: ['group_id'],
} as const satisfies JSONSchema;
// enum是不是有点抽象
type Payload = FromSchema<typeof SchemaData>;
@@ -17,6 +17,7 @@ type Payload = FromSchema<typeof SchemaData>;
export class GetGroupHonorInfo extends BaseAction<Payload, Array<any>> {
actionName = ActionName.GetGroupHonorInfo;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload) {
if (!payload.type) {
payload.type = WebHonorType.ALL;