restart change to start in api restart wa

This commit is contained in:
2026-03-18 18:36:29 +07:00
parent f4b400fe02
commit 76ac604ba8
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,6 @@
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"cors": "^2.8.5", "cors": "^2.8.5",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"exceljs": "^4.4.0", "exceljs": "^4.4.0",

View File

@@ -110,6 +110,7 @@ class NotifikasiWaService {
const resultNotificationErrorUser = const resultNotificationErrorUser =
await createNotificationErrorUserDb({ await createNotificationErrorUserDb({
notification_error_id: param.idData, notification_error_id: param.idData,
contact_phone: param.userPhone, contact_phone: param.userPhone,
contact_name: param.userName, contact_name: param.userName,
message_error_issue: param.bodyMessage, message_error_issue: param.bodyMessage,
@@ -185,7 +186,7 @@ class NotifikasiWaService {
}); });
// console.log(`start proses id: ${waProcessId}`); // console.log(`start proses id: ${waProcessId}`);
await execPromise(`start powershell -Command "pm2 restart ${waProcessId}"`); await execPromise(`start powershell -Command "pm2 start ${waProcessId}"`);
return { success: true, message: "WhatsApp has been restarted." }; return { success: true, message: "WhatsApp has been restarted." };
} catch (err) { } catch (err) {