@andrey4emk/npm-app-back-b24 0.5.8 → 0.5.10
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 +1 -1
- package/sendMessage/chatApp.js +2 -4
package/package.json
CHANGED
package/sendMessage/chatApp.js
CHANGED
|
@@ -44,7 +44,6 @@ export class ChatApp {
|
|
|
44
44
|
if (check.error) {
|
|
45
45
|
return { error: true, message: `Ошибка с токеном ChatApp в функции sendMessageChatApp класса ChatApp\n${check.message}`, data: null };
|
|
46
46
|
}
|
|
47
|
-
return;
|
|
48
47
|
let phone = messageData.phone;
|
|
49
48
|
let message = messageData.message;
|
|
50
49
|
let url;
|
|
@@ -128,16 +127,15 @@ export class ChatApp {
|
|
|
128
127
|
method: "GET",
|
|
129
128
|
headers: {
|
|
130
129
|
Lang: "en",
|
|
131
|
-
"Content-Type": "application/json",
|
|
132
130
|
Accept: "application/json",
|
|
133
|
-
|
|
131
|
+
Authorization: this.auth.accessToken,
|
|
134
132
|
},
|
|
135
133
|
});
|
|
136
134
|
|
|
137
135
|
const data = await response.json();
|
|
138
136
|
console.log("Token check response data:", data);
|
|
139
137
|
if (!data.success) {
|
|
140
|
-
|
|
138
|
+
await this.refreshTokenChatApp();
|
|
141
139
|
return { error: false, message: "Токен обновлен" };
|
|
142
140
|
} else {
|
|
143
141
|
return { error: false, message: "Токен действителен" };
|