mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 16:31:55 +00:00
[HD]: Fix Token Refresh
This commit is contained in:
parent
e3b7bd3df3
commit
959518499b
1 changed files with 1 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ export default class Hidive implements ServiceClass {
|
||||||
};
|
};
|
||||||
let apiReq = await this.req.getData(options.url, apiReqOpts);
|
let apiReq = await this.req.getData(options.url, apiReqOpts);
|
||||||
if(!apiReq.ok || !apiReq.res){
|
if(!apiReq.ok || !apiReq.res){
|
||||||
if (apiReq.error && apiReq.error.res?.status == 401) {
|
if ((apiReq.error && apiReq.error.res?.status == 401) || (apiReq.res && apiReq.res.status == 401)) {
|
||||||
console.warn('Token expired, refreshing token and retrying.');
|
console.warn('Token expired, refreshing token and retrying.');
|
||||||
if (await this.refreshToken()) {
|
if (await this.refreshToken()) {
|
||||||
if (authType == 'other') {
|
if (authType == 'other') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue