refactor: inline all NTQQXxxApi uses

This commit is contained in:
Wesley F. Young committed 2024-08-31 16:00:03 +08:00
1 parent 78452cf6a9
commit b5deb198de
60 files changed
+130 -281

No files matched your search

+2 -3
View File
@@ -18,11 +18,10 @@ export default class SendLike extends BaseAction<Payload, null> {
payloadSchema = SchemaData;
async _handle(payload: Payload): Promise<null> {
const NTQQUserApi = this.core.apis.UserApi;
//logDebug('点赞参数', payload);
const qq = payload.user_id.toString();
const uid: string = await NTQQUserApi.getUidByUinV2(qq) || '';
const result = await NTQQUserApi.like(uid, parseInt(payload.times?.toString()) || 1);
const uid: string = await this.core.apis.UserApi.getUidByUinV2(qq) || '';
const result = await this.core.apis.UserApi.like(uid, parseInt(payload.times?.toString()) || 1);
//logDebug('点赞结果', result);
if (result.result !== 0) {
throw `点赞失败 ${result.errMsg}`;