mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 08:42:42 +00:00
Finally testing, things should be working a bit better now
This commit is contained in:
@@ -88,10 +88,9 @@ const BrewData = {
|
||||
return newBrew.save();
|
||||
},
|
||||
update : (newBrew) => {
|
||||
return Brew.findOneAndUpdate({ editId : newBrew.editId }, {
|
||||
...newBrew,
|
||||
updatedAt : Date.now()
|
||||
}, {new : true, upsert : true}).exec(); //TODO: TEST THIS that this returns a reocrd
|
||||
return Brew.findOneAndUpdate({ editId : newBrew.editId },
|
||||
_.merge(newBrew, { updatedAt : Date.now() }),
|
||||
{new : true, upsert : true}).exec(); //TODO: TEST THIS that this returns a reocrd
|
||||
},
|
||||
remove : (editId) => {
|
||||
return Brew.find({ editId }).remove().exec();
|
||||
|
||||
Reference in New Issue
Block a user