@andrey4emk/npm-app-back-b24 0.4.0 → 0.4.2

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/chatApp.js +4 -4
  2. package/package.json +1 -1
package/chatApp.js CHANGED
@@ -160,9 +160,9 @@ class ChatApp {
160
160
  });
161
161
  let data = await res.json();
162
162
  if (!data.success) {
163
- return { error: true, message: `Ошибка при отправке сообщения в ChatApp через ${messangerType}`, data: null };
163
+ return { error: true, message: `Ошибка при отправке сообщения в ChatApp через ${messangerType}`, data: data };
164
164
  } else {
165
- return { error: false, message: `Сообщение успешно отправлено в ChatApp через ${messangerType}`, data: null };
165
+ return { error: false, message: `Сообщение успешно отправлено в ChatApp через ${messangerType}`, data: data };
166
166
  }
167
167
  }
168
168
 
@@ -172,7 +172,7 @@ class ChatApp {
172
172
  }
173
173
  let check = await this.checkTokenChatApp();
174
174
  if (check.error) {
175
- return { error: true, message: `Ошибка с токеном ChatApp в функции phoneCheckChatApp класса ChatApp\n${check.message}`, data: null };
175
+ return { error: true, message: `Ошибка с токеном ChatApp в функции phoneCheckChatApp класса ChatApp\n${check.message}`, data: check };
176
176
  }
177
177
  let url;
178
178
  if (messangerType === "whatsApp") {
@@ -191,7 +191,7 @@ class ChatApp {
191
191
  });
192
192
  let data = await res.json();
193
193
  if (!data.success) {
194
- return { error: true, message: `Ошибка при проверке телефона в ChatApp через ${messangerType}`, data: null };
194
+ return { error: true, message: `Ошибка при проверке телефона в ChatApp через ${messangerType}`, data: data };
195
195
  } else {
196
196
  return { error: false, message: `Телефон успешно проверен в ChatApp через ${messangerType}`, data: data };
197
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrey4emk/npm-app-back-b24",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Bitrix24 OAuth helpers for Node.js projects",
5
5
  "main": "index.js",
6
6
  "type": "module",