Remove deprecated usages of mongodb and mongoose remove, update, and insert methods (#16573)

* Remove usage of mongo .insert in favour of .insertOne

* Replace usages of update with updateOne

* Replace remove with deleteOne/deleteMany

* Update one more usage of `remove`

* Update a few missed usages of remove/update/insert

GitOrigin-RevId: 49d08eca1ce80831c375c343fb8b5b3846b71460
This commit is contained in:
David
2024-01-24 09:03:34 +00:00
committed by Copybot
parent da6de7bbb2
commit 4535739412
@@ -26,7 +26,7 @@ async function updateSurvey({ name, preText, linkText, url, options }) {
async function deleteSurvey() {
const survey = await getSurvey()
if (survey) {
await survey.remove()
await survey.deleteOne()
}
}