mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: 标准化凭据获取
This commit is contained in:
@@ -5,8 +5,12 @@ export class GetCSRF extends BaseAction<any, any> {
|
||||
actionName = ActionName.GetCSRF;
|
||||
|
||||
async _handle(payload: any) {
|
||||
const sKey = await this.core.apis.UserApi.getSKey();
|
||||
if (!sKey) {
|
||||
throw new Error('SKey is undefined');
|
||||
}
|
||||
return {
|
||||
token: '',
|
||||
token: +this.core.apis.WebApi.getBknFromSKey(sKey),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user