category.js 375 B

1234567891011121314
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const meta = require('./category.json');
  4. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  5. class CategoryController extends Controller {
  6. constructor(ctx) {
  7. super(ctx);
  8. this.service = this.ctx.service.category;
  9. }
  10. }
  11. module.exports = CrudController(CategoryController, meta);