UNPKG

baucis-decorator-instance

Version:
20 lines (18 loc) 373 B
'use strict'; /** * Forces `of` and `descendants` population. * * @api public */ exports = module.exports = instance; function instance () { this.request('get', function (req, res, next) { if (req.query.populate) { req.query.populate += ' '; } else { req.query.populate = ''; } req.query.populate += 'of descendants'; next(); }); }