ggez-banking-sdk
Advanced tools
Comparing version
@@ -27,3 +27,3 @@ "use strict"; | ||
const getGeoCoordinates = async (baseUrl) => { | ||
let ipAddressAndLocation = await (0, exports.IPAddressAndLocation)(`${baseUrl}/v1/myipaddress`); | ||
let ipAddressAndLocation = await (0, exports.IPAddressAndLocation)(baseUrl); | ||
let geo_coordinates; | ||
@@ -34,5 +34,6 @@ if (ipAddressAndLocation instanceof Error) { | ||
else { | ||
geo_coordinates.latitude = ipAddressAndLocation.latitude.toString(); | ||
geo_coordinates.longitude = ipAddressAndLocation.longitude.toString(); | ||
geo_coordinates.position_description = `${ipAddressAndLocation.city}, ${ipAddressAndLocation.country}`; | ||
geo_coordinates.latitude = ipAddressAndLocation.latitude.toString() ?? "0"; | ||
geo_coordinates.longitude = | ||
ipAddressAndLocation.longitude.toString() ?? "0"; | ||
geo_coordinates.position_description = `${ipAddressAndLocation.city ?? "N/A"}, ${ipAddressAndLocation.country ?? "N/A"}`; | ||
return geo_coordinates; | ||
@@ -53,5 +54,5 @@ } | ||
geo_coordinates = { | ||
latitude: ipAddressAndLocation.latitude.toString(), | ||
longitude: ipAddressAndLocation.longitude.toString(), | ||
position_description: `${ipAddressAndLocation.city}, ${ipAddressAndLocation.country}`, | ||
latitude: ipAddressAndLocation.latitude.toString() ?? "0", | ||
longitude: ipAddressAndLocation.longitude.toString() ?? "0", | ||
position_description: `${ipAddressAndLocation.city ?? "N/A"}, ${ipAddressAndLocation.country ?? "N/A"}`, | ||
}; | ||
@@ -61,3 +62,3 @@ } | ||
geo_coordinates: geo_coordinates, | ||
ip_address: ipAddressAndLocation.ip_address, | ||
ip_address: ipAddressAndLocation.ip_address ?? "N/A", | ||
}; | ||
@@ -64,0 +65,0 @@ } |
{ | ||
"name": "ggez-banking-sdk", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
791694
0.01%25960
0