install twilio, gps coords in message
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -78,14 +78,16 @@ 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.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user