home.js 458 B

1234567891011121314
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  4. const { BusinessError, ErrorCode } = require('naf-core').Error;
  5. const { ObjectId } = require('mongoose').Types;
  6. // 项目测试及管理员登陆
  7. class HomeController extends Controller {
  8. async index() {
  9. const { ctx } = this;
  10. ctx.body = 'hello';
  11. }
  12. }
  13. module.exports = CrudController(HomeController, {});