home.js 893 B

123456789101112131415161718192021222324
  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. const _ = require('lodash');
  7. // 项目测试及管理员登陆
  8. class HomeController extends Controller {
  9. async index() {
  10. const { ctx } = this;
  11. ctx.body = 'hei!';
  12. // const match_id = '630ec4700a92b0a015ccfd14';
  13. // const group_id = '6318277947be96470e849b6a';
  14. // const project_id = '631827f047be96470e849bc1';
  15. // await this.ctx.service.matchTeamGroup.checkEliminate(match_id, group_id, project_id);
  16. }
  17. async util() {
  18. const body = this.ctx.request.body;
  19. const data = await this.ctx.service.eliminate.toNextRace(body);
  20. this.ctx.ok({ data });
  21. }
  22. }
  23. module.exports = CrudController(HomeController, {});