mongoose - What use in default tag for to get all mongodb values? -
how use in default tag values?
const querydefaults = { 'tag': ??????????, 'sort': 'createdat', 'limit': 30, 'skip': 0, }; articleschema.statics.list = function ({tag, sort, limit, skip}) { console.log(tag); return this.find({'tags.label': tag}) .sort({sort: -1}) .skip(skip) .limit(limit) .exec(); };
Comments
Post a Comment