setting.js 519 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.setting.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 设置表管理
  7. class SettingController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.setting;
  11. }
  12. async findone() {
  13. const data = await this.service.findone();
  14. this.ctx.ok({ data });
  15. }
  16. }
  17. module.exports = CrudController(SettingController, meta);