1234567891011121314151617 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- class HomeController extends Controller {
- async index() {
- const { ctx } = this;
- ctx.body = 'hi, egg';
- }
- async util() {
- const res = await this.ctx.model.Position.deleteMany();
- this.ctx.ok(res);
- }
- }
- module.exports = HomeController;
|