These are chat archives for Automattic/mongoose

Aug 2017
Artyom Tsurkan
Aug 25 2017 21:42
How to find all articles by a certain Tag,label, if in Articles instances I have only array of _id 's of Tag model and all label in Tag model?
articleSchema.statics.list = function ({tag, sort, limit, skip}) {

    return this
            ??????????????? 'tags': tag  ???????????
        .sort('-' + sort)
        .then( (savedArticle) =>{

        .catch(e => next(e));