mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 21:10:23 +00:00
chore: run a full eslint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQSystemApi } from '@/core/apis';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
const SchemaData = {
|
||||
@@ -8,8 +7,8 @@ const SchemaData = {
|
||||
properties: {
|
||||
words: {
|
||||
type: 'array',
|
||||
items: { type: 'string' }
|
||||
}
|
||||
items: { type: 'string' },
|
||||
},
|
||||
},
|
||||
required: ['words'],
|
||||
} as const satisfies JSONSchema;
|
||||
@@ -19,6 +18,7 @@ type Payload = FromSchema<typeof SchemaData>;
|
||||
export class TranslateEnWordToZn extends BaseAction<Payload, Array<any> | null> {
|
||||
actionName = ActionName.TranslateEnWordToZn;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
const NTQQSystemApi = this.CoreContext.getApiContext().SystemApi;
|
||||
const ret = await NTQQSystemApi.translateEnWordToZn(payload.words);
|
||||
|
||||
Reference in New Issue
Block a user