Skip to content

Instantly share code, notes, and snippets.

@Akifcan
Created March 22, 2021 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akifcan/b5cc9d510d074c28afd9c3403c88327d to your computer and use it in GitHub Desktop.
Save Akifcan/b5cc9d510d074c28afd9c3403c88327d to your computer and use it in GitHub Desktop.
// 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