fixing body message notification wa
This commit is contained in:
@@ -20,7 +20,7 @@ class NotificationErrorUserService {
|
||||
try {
|
||||
const results = await getAllNotificationErrorUserDb(param);
|
||||
|
||||
results.data.map((element) => {});
|
||||
results.data.map((element) => { });
|
||||
|
||||
return results;
|
||||
} catch (error) {
|
||||
@@ -139,13 +139,10 @@ class NotificationErrorUserService {
|
||||
const shortUrl = await shortUrltiny(encodedToken);
|
||||
|
||||
const bodyWithUrl =
|
||||
`Hai ${data.contact_name || "-"}\n` +
|
||||
`Terjadi peringatan dengan kode error ${data.error_code || "-"} - ${
|
||||
data.error_code_name || "-"
|
||||
} ` +
|
||||
`pada device ${
|
||||
data.device_name || "-"
|
||||
}, silahkan cek detail pada link berikut:\n` +
|
||||
`Hai ${data.contact_name || "-"},\n` +
|
||||
`Terjadi peringatan dengan kode ${data?.error_code ?? "-"} "${data?.error_code_name ?? ""}", Chanel ${data?.chanel_id ?? "-"} ` +
|
||||
`pada device ${data?.device_name ?? "berikut"},` +
|
||||
`\nSilahkan cek detail pada link :` +
|
||||
`${shortUrl}`;
|
||||
|
||||
const resultSend = await sendNotifikasi(
|
||||
@@ -165,9 +162,8 @@ class NotificationErrorUserService {
|
||||
results.push({
|
||||
id,
|
||||
status: "failed",
|
||||
message: `WhatsApp API Gagal: ${
|
||||
resultSend?.message || "Unknown Error"
|
||||
}`,
|
||||
message: `WhatsApp API Gagal: ${resultSend?.message || "Unknown Error"
|
||||
}`,
|
||||
});
|
||||
} else {
|
||||
results.push({
|
||||
|
||||
Reference in New Issue
Block a user