refactor: uin - > uid
This commit is contained in:
1 parent
9e72547112
commit
62605c843b
9 files changed
+49
-50
No files matched your search
@@ -1,10 +1,8 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { OB11User } from '../../types';
|
||||
import { getUidByUin, uid2UinMap } from '@/core/data';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQUserApi } from '@/core/apis/user';
|
||||
import { log, logDebug } from '@/common/utils/log';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
|
||||
const SchemaData = {
|
||||
@@ -23,10 +21,11 @@ export default class GoCQHTTPGetStrangerInfo extends BaseAction<Payload, OB11Use
|
||||
protected async _handle(payload: Payload): Promise<OB11User> {
|
||||
const user_id = payload.user_id.toString();
|
||||
//logDebug('uidMaps', uidMaps);
|
||||
const uid = getUidByUin(user_id);
|
||||
if (!uid) {
|
||||
throw new Error('查无此人');
|
||||
}
|
||||
return OB11Constructor.stranger(await NTQQUserApi.getUserDetailInfo(uid));
|
||||
// const uid = getUidByUin(user_id);
|
||||
// if (!uid) {
|
||||
// throw new Error('查无此人');
|
||||
// }
|
||||
// !!!!!!!!!!!!!!!需要重构
|
||||
return OB11Constructor.stranger(await NTQQUserApi.getUserDetailInfo((await NTQQUserApi.getUidByUin(user_id))!));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user