123456789101112131415161718192021 |
- 'use strict';
- const _ = require('lodash');
- const meta = require('./.comment.js');
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- // 评论管理
- class CommentController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.comment;
- }
- async index() {
- const res = await this.service.query(this.ctx.query);
- this.ctx.ok({ ...res });
- }
- }
- module.exports = CrudController(CommentController, meta);
|