@andrey4emk/npm-app-back-b24 0.5.22 → 0.5.24

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.
Files changed (2) hide show
  1. package/bitrix24/b24.js +2 -2
  2. package/package.json +1 -1
package/bitrix24/b24.js CHANGED
@@ -32,7 +32,7 @@ async function makeAuthParams(authParamB24, secretParamB24) {
32
32
 
33
33
  export async function create(authParamB24, secretParamB24) {
34
34
  let { AuthParams, secret } = await makeAuthParams(authParamB24, secretParamB24);
35
- return new B24OAuth(AuthParams, secret);
35
+ return await new B24OAuth(AuthParams, secret);
36
36
  }
37
37
 
38
38
  // Функция продления токена битрикс24 и сохранения в БД
@@ -45,7 +45,7 @@ export async function refresh(authParamB24, secretParamB24) {
45
45
  }
46
46
  return { error: false, message: "Токены битрикс24 успешно обновлены.", data: newToken };
47
47
  } catch (error) {
48
- return { error: true, message: "Не удалось продлить авторизацию." };
48
+ return { error: true, message: "Не удалось продлить авторизацию.", data: error };
49
49
  }
50
50
  }
51
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrey4emk/npm-app-back-b24",
3
- "version": "0.5.22",
3
+ "version": "0.5.24",
4
4
  "description": "Bitrix24 OAuth helpers for Node.js projects",
5
5
  "main": "index.js",
6
6
  "type": "module",