1234567891011121314 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
- const options = require('../public/options');
- const _ = require('lodash');
- // 选项
- class OptionsController extends Controller {
- async index() {
- const body = this.ctx.request.body;
- const data = _.pick(options, body);
- this.ctx.ok({ data });
- }
- }
- module.exports = CrudController(OptionsController, {});
|