fixing body message notification wa

This commit is contained in:
2026-01-13 16:18:09 +07:00
parent 890a88447e
commit 7122818181
5 changed files with 26 additions and 28 deletions

View File

@@ -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({