Change tests from .remove() to deleteOne()

This commit is contained in:
Trevor Buckner committed 2023-04-04 17:47:25 -04:00
1 parent a5e84694c1
commit eaf7b9c4ef
2 files changed
+19 -15

No files matched your search

+1 -1
View File
@@ -305,7 +305,7 @@ If you believe you should have access to this brew, ask the file owner to invite
if(brew.authors.length === 0) {
// Delete brew if there are no authors left
await brew.deleteOne()
await HomebrewModel.deleteOne({ _id: brew._id })
.catch((err)=>{
console.error(err);
throw { status: 500, message: 'Error while removing' };