0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Change tests from .remove() to deleteOne()

This commit is contained in:
Trevor Buckner
2023-04-04 17:47:25 -04:00
parent a5e84694c1
commit eaf7b9c4ef
2 changed files with 19 additions and 15 deletions

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' };