@andrey4emk/npm-app-back-b24 0.6.2 → 0.6.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrey4emk/npm-app-back-b24",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Bitrix24 OAuth helpers for Node.js projects",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -218,15 +218,15 @@ export class Wappi {
218
218
 
219
219
  let token = this.telegaAuth.token;
220
220
  let profile_id = this.telegaAuth.profile_id;
221
- let url = `https://wappi.pro/tapi/sync/contact/add`;
222
-
221
+ let url = `https://wappi.pro/tapi/sync/contact/add?profile_id=${profile_id}`;
222
+ console.log("addContactTelegramWappi token,profile_id и url:");
223
+ console.log(token, profile_id, url);
223
224
  try {
224
225
  let res = await fetch(url, {
225
226
  method: "POST",
226
227
  headers: {
227
228
  "Content-Type": "application/json",
228
229
  Authorization: token,
229
- profile_id: profile_id,
230
230
  },
231
231
  body: JSON.stringify({
232
232
  phone: phone,
@@ -235,7 +235,7 @@ export class Wappi {
235
235
  });
236
236
 
237
237
  let data = await res.json();
238
-
238
+ console.log("addContactTelegramWappi data:", data);
239
239
  if (data.status !== "done") {
240
240
  return { error: true, message: `Ошибка создания контакта ${phone} в Telegram`, data: data };
241
241
  } else {