0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Remove unnecessary function from HB.model

This commit is contained in:
G.Ambatte
2024-05-15 19:50:27 +12:00
parent b093be52a2
commit 7c4721932d
2 changed files with 20 additions and 31 deletions

View File

@@ -62,12 +62,6 @@ HomebrewSchema.statics.getByUser = async function(username, allowAccess=false, f
return brews;
};
HomebrewSchema.statics.getAggregate = async function(aggregate, options={}){
const output = await Homebrew.aggregate(aggregate, options)
.catch((error)=>{throw 'Can not get aggregate';});
return output;
};
const Homebrew = mongoose.model('Homebrew', HomebrewSchema);
module.exports = {