From 5348991f2d1d7003446be2527e40f2a310e8901d Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 31 Jul 2024 23:18:27 -0600 Subject: [PATCH] asaa --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index cb9a3b1..c0524ce 100644 --- a/index.js +++ b/index.js @@ -105,12 +105,12 @@ function sendAlert(accountNumber, transaction, placeName, systemName, zoneNumber function sendVerificationCode(account) { // Get verification code from database - db.get("SELECT * FROM verification_codes WHERE account_id = ?", account, (err, row) => { + db.get("SELECT * FROM accounts WHERE id = ?", account, (err, row) => { if (err) { console.error(err); } else if (row) { // Send verification code to phone number - runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.code}" -o /tmp/${account}-code.wav`).then((output) => { + runCommand(`flite -t "Hello. This is an automated call from KCA SecuriNet Monitoring. Your verification code is ${row.verification_code}" -o /tmp/${account}-code.wav`).then((output) => { runCommand(`ffmpeg -y -i /tmp/${account}-code.wav -ar 8000 -ac 1 -c:a pcm_s16le /tmp/${account}-verification.wav`).then(() => { runCommand(`rm /tmp/${account}-code.wav`) // strip extension from filename