This commit is contained in:
2024-06-10 19:36:39 +05:00
parent 6f6555e1c1
commit 211f206e86
3 changed files with 6 additions and 7 deletions
+2 -4
View File
@@ -242,21 +242,19 @@ async function checkScheduledSessions() {
.json();
if (!result.stream) {
console.log("Not result");
console.log("Not result.stream");
return;
}
const result2 = await got
.put(`${process.env.CRM_API_URL}/scheduled_sessions/${session.id}`, {
json: {
startAt: session.startAt,
endAt: session.endAt,
activeSessionId: result.stream,
},
})
.json();
console.log("CRON Start session: ", result2);
console.log("result2: ", result2);
} else if (isAfter(new Date(), parseISO(session.endAt))) {
const result = await got
.post(