'use strict'; const _ = require('lodash'); module.exports = options => { return async function setcolumnforquery(ctx, next) { const query = ctx.request.query; const customer = _.get(ctx.user, '_id'); if (!query.customer) query.customer = customer; await next(); }; };