12345678910111213141516171819 |
- '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.System.Config;
- }
- async query() {
- const data = await this.model.findOne({});
- return data;
- }
- }
- module.exports = ConfigService;
|