-
-
Save Akifcan/b5cc9d510d074c28afd9c3403c88327d to your computer and use it in GitHub Desktop.
This file contains 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
// This function is the webhook's request handler. | |
exports = function(payload, response) { | |
const body = EJSON.parse(payload.body.text()); | |
const result = context.services.get("mongodb-atlas").db("cuties").collection("pets").insertOne(body); | |
return result; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment