noControllerList.js 301 B

1234567891011
  1. 'use strict';
  2. const _ = require('lodash');
  3. module.exports = options => {
  4. return async function noControllerList(ctx, next) {
  5. await next();
  6. const { data: od } = ctx.response.body;
  7. const { data, total } = od;
  8. ctx.response.body.data = data;
  9. ctx.response.body.total = total;
  10. };
  11. };