12345678910111213141516 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
- //
- class AdminController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.statistics.admin;
- }
- async todo() {
- const res = await this.service.todo(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- }
- module.exports = CrudController(AdminController, {});
|