personchat.js 543 B

123456789101112131415161718192021
  1. 'use strict';
  2. // const _ = require('lodash');
  3. const meta = require('./.personchat.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 私人聊天表管理
  7. class PersonchatController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.personchat;
  11. }
  12. async received() {
  13. await this.service.received(this.ctx.request.body);
  14. this.ctx.ok({ });
  15. }
  16. }
  17. module.exports = CrudController(PersonchatController, meta);