sms host change
This commit is contained in:
@ -372,14 +372,14 @@ async function commitMessage(now, logDevice) {
|
||||
const rawMsg = `${nopol} | OVERSPEED | ${time} | ${logDevice.speed} km/h | ${address}`.substring(0, 150).trim()
|
||||
// const rawMsg = `${nopol} | OVERSPEED | ${time} | ${logDevice.speed} km/h`.trim()
|
||||
const countryCode = process.env.SMS_COUNTRY_CODE ?? "670"
|
||||
const smsHost = process.env.SMS_HOST ?? "http://192.168.40.2:8181"
|
||||
const smsHost = process.env.SMS_HOST ?? "http://192.168.40.2:8181/submitsm/ka"
|
||||
|
||||
await Promise.allSettled(
|
||||
users
|
||||
.filter(u => u.phone)
|
||||
.map(async (user) => {
|
||||
try {
|
||||
await axios.get(`${smsHost}/mobicents/sendSms`, {
|
||||
await axios.get(`${smsHost}`, {
|
||||
params: { to: `${countryCode}${user.phone}`, msg: rawMsg, sender: "Overspeed FROTA" },
|
||||
})
|
||||
} catch (smsErr) {
|
||||
|
||||
Reference in New Issue
Block a user