This commit is contained in:
2019-07-17 03:21:49 -04:00
parent d5b34dc81f
commit 77f836842b
10 changed files with 145 additions and 4 deletions

View File

@@ -131,5 +131,9 @@ ItemSchema.statics.addBatch = function(data = [], callback = () => {}) {
};
ItemSchema.statics.getAuctionItemsByEvent = function(eventId, callback = () => {}) {
return this.find({ eventId, type: 'auction' }, callback);
};
const Item = mongoose.model('Item', ItemSchema);
module.exports = Item;