feat: 标准化凭据获取

This commit is contained in:
手瓜一十雪 committed 2024-10-22 11:04:28 +08:00
1 parent db9a09eff6
commit 3067b1998d
5 files changed
+48 -3

No files matched your search

+5 -1
View File
@@ -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),
};
}
}