From 86151d7bf90d4f8ee06318195402e6b021dc826f Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 11 Jan 2025 02:03:46 -0700 Subject: [PATCH] guh --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 70a7435..9aa8340 100644 --- a/index.js +++ b/index.js @@ -38,13 +38,13 @@ function parseVoicemailData(data) { } function getUsers() { - var vmData = fs.readFileSync(process.env.DEV ? "./dev/voicemail.conf" : "/etc/asterisk/voicemail.conf").toString() + var vmData = fs.readFileSync(process.env.DEV == "true" ? "./dev/voicemail.conf" : "/etc/asterisk/voicemail.conf").toString() voicemailData = parseVoicemailData(extractTextFromRawText(vmData)); return voicemailData; } function getEndpoints() { - if (!process.env.DEV) { + if (!process.env.DEV == "true") { const currentEndpoint = execSync('asterisk -x "pjsip show endpoints"').toString(); const endpoints = currentEndpoint.split("\n"); return endpoints; @@ -142,7 +142,7 @@ function renderStatusPage() { if (err) { console.error(err); } else { - fs.writeFileSync(process.env.DEV ? "./dev/index.html" : "/var/www/html/status/index.html", str); + fs.writeFileSync(process.env.DEV == "true" ? "./dev/index.html" : "/var/www/html/status/index.html", str); } }); }