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-23 10:33:53 +00:00 committed by Copybot
parent aa1e29aa19
commit 7f113250aa

View file

@ -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()
}
}