123456789101112131415161718 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose-free/lib/service');
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- const _ = require('lodash');
- const assert = require('assert');
- // 设置
- class ConfigService extends CrudService {
- constructor(ctx) {
- super(ctx, 'config');
- this.model = this.ctx.model.Config;
- }
- async fetch() {
- return await this.model.findOne();
- }
- }
- module.exports = ConfigService;
|