mirror of
https://github.com/vernu/textbee.git
synced 2026-05-19 14:02:04 -04:00
payload details fix backend
This commit is contained in:
@@ -754,7 +754,11 @@ recipient,
|
||||
}
|
||||
|
||||
// Update the SMS
|
||||
const updatedSms = await this.smsModel.findByIdAndUpdate(dto.smsId, { $set: updateData });
|
||||
const updatedSms = await this.smsModel.findByIdAndUpdate(
|
||||
dto.smsId,
|
||||
{ $set: updateData },
|
||||
{ new: true }
|
||||
);
|
||||
|
||||
// Check if all SMS in batch have the same status, then update batch status
|
||||
if (dto.smsBatchId) {
|
||||
|
||||
@@ -27,17 +27,18 @@ const message_send_template = {
|
||||
recipient: "+123456789",
|
||||
deviceId: 'deviceId',
|
||||
webhookSubscriptionId: 'webhookSubscriptionId',
|
||||
webhookEvent: 'sms.received',
|
||||
}
|
||||
|
||||
const sms_delivered_payload = {
|
||||
...message_send_template,
|
||||
sentAt: "datetime",
|
||||
deliveredAt: 'datetime',
|
||||
webhookEvent: 'sms.delivered',
|
||||
}
|
||||
const sms_sent_payload = {
|
||||
...message_send_template,
|
||||
status: "sent"
|
||||
status: "sent",
|
||||
webhookEvent: 'sms.sent',
|
||||
}
|
||||
|
||||
const sms_sent_failed = {
|
||||
@@ -45,7 +46,8 @@ const sms_sent_failed = {
|
||||
status: "failed",
|
||||
errorCode: "ErorCode",
|
||||
errorMessage: "Error",
|
||||
failedAt: "datetime"
|
||||
failedAt: "datetime",
|
||||
webhookEvent: 'sms.send_failed',
|
||||
}
|
||||
|
||||
const VERIFICATION_CODE = `
|
||||
|
||||
Reference in New Issue
Block a user