install twilio, gps coords in message

This commit is contained in:
BGV
2025-03-30 11:10:23 -04:00
parent d18ab2ff28
commit 57c954cbcd
2 changed files with 6 additions and 3 deletions

View File

@@ -13,7 +13,8 @@
"mongoose": "^8.13.1", "mongoose": "^8.13.1",
"next": "15.2.4", "next": "15.2.4",
"react": "^19.1.0", "react": "^19.1.0",
"react-dom": "^19.1.0" "react-dom": "^19.1.0",
"twilio": "^5.5.1"
}, },
"devDependencies": { "devDependencies": {
"@skeletonlabs/skeleton": "^3.1.1", "@skeletonlabs/skeleton": "^3.1.1",

View File

@@ -78,13 +78,15 @@ function CallPage() {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
body: JSON.stringify({ body: JSON.stringify({
message: `John Smith needs help.`, message: `John Smith needs help. His GPS location is: https://www.google.com/maps/search/?api=1&query=38.03163938795633,-78.51085551716174`,
}), }),
}); });
if (!response.ok) { if (!response.ok) {
console.error("Error sending message:", response.statusText); console.error("Error sending message:", response.statusText);
return; return;
} else {
alert("Emergency message sent successfully.");
} }
} }