@slavmak2486/bx24ts 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BX24Server.ts +1 -1
- package/base/BX24.ts +1 -1
- package/dist/BX24Server.js +1 -1
- package/dist/base/BX24.js +1 -1
- package/package.json +1 -1
package/BX24Server.ts
CHANGED
|
@@ -144,7 +144,7 @@ export class BX24Server extends baseBX24{
|
|
|
144
144
|
|
|
145
145
|
refreshAuthAsync():Promise<getAuth> {
|
|
146
146
|
return new Promise((resolve, reject) => {
|
|
147
|
-
this.call("https://
|
|
147
|
+
this.call("https://oauth.bitrix.info/oauth/token/", {
|
|
148
148
|
method:'refresh_token',
|
|
149
149
|
data:{
|
|
150
150
|
grant_type: 'refresh_token',
|
package/base/BX24.ts
CHANGED
|
@@ -256,7 +256,7 @@ export abstract class baseBX24{
|
|
|
256
256
|
if (!err?.response?.data){
|
|
257
257
|
reject(err);
|
|
258
258
|
}
|
|
259
|
-
else if (__get(err, ['response','data','error'], undefined)=='expired_token'&&!url.includes('
|
|
259
|
+
else if (__get(err, ['response','data','error'], undefined)=='expired_token'&&!url.includes('oauth.bitrix.info/oauth/token/')){
|
|
260
260
|
try {
|
|
261
261
|
this.refreshAuth(()=>{
|
|
262
262
|
this.call(url, config).then(resolve).catch(reject);
|
package/dist/BX24Server.js
CHANGED
|
@@ -115,7 +115,7 @@ class BX24Server extends BX24_1.baseBX24 {
|
|
|
115
115
|
}
|
|
116
116
|
refreshAuthAsync() {
|
|
117
117
|
return new Promise((resolve, reject) => {
|
|
118
|
-
this.call("https://
|
|
118
|
+
this.call("https://oauth.bitrix.info/oauth/token/", {
|
|
119
119
|
method: 'refresh_token',
|
|
120
120
|
data: {
|
|
121
121
|
grant_type: 'refresh_token',
|
package/dist/base/BX24.js
CHANGED
|
@@ -224,7 +224,7 @@ class baseBX24 {
|
|
|
224
224
|
if (!((_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data)) {
|
|
225
225
|
reject(err);
|
|
226
226
|
}
|
|
227
|
-
else if ((0, lodash_1.get)(err, ['response', 'data', 'error'], undefined) == 'expired_token' && !url.includes('
|
|
227
|
+
else if ((0, lodash_1.get)(err, ['response', 'data', 'error'], undefined) == 'expired_token' && !url.includes('oauth.bitrix.info/oauth/token/')) {
|
|
228
228
|
try {
|
|
229
229
|
this.refreshAuth(() => {
|
|
230
230
|
this.call(url, config).then(resolve).catch(reject);
|