Created
March 23, 2021 00:03
-
-
Save Akifcan/8d0141c1559d32ebdb071a39cfaec27c to your computer and use it in GitHub Desktop.
real function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports = function(){ | |
return context.http.get({ url: "http://gd.geobytes.com/GetCityDetails" }) | |
.then(userInfo => { | |
const { geobytescountry, geobytesipaddress, geobytesfqcn } = EJSON.parse(userInfo.body.text()) | |
const result = context.services.get("mongodb-atlas").db("cuties").collection("logs").insertOne({ geobytescountry, geobytesipaddress, geobytesfqcn }); | |
return result | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment