'use strict'; const _ = require('lodash'); const meta = require('./.nurse.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 护士管理 class NurseController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.nurse; } async update() { await this.service.update(this.ctx.params, this.ctx.request.body); this.ctx.ok({ msg: 'accepted' }); } async login() { const res = await this.service.login(this.ctx.request.body); this.ctx.ok({ data: res }); } } module.exports = CrudController(NurseController, meta);