Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MongoDB Stitch Delete Events Example
exports = async function(payload) {
const mongodb ="mongodb-atlas");
const eventsdb = mongodb.db("events");
const eventscoll = eventsdb.collection("events");
const delresult = await eventscoll.deleteOne({, location: payload.query.location});
return { text: `Deleted ${delresult.deletedCount} items` };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.