'use strict'; const Controller = require('egg').Controller; class AdminUserController extends Controller { async create() { const { ctx } = this; const res = await ctx.service.adminUser.create(ctx.request.body); ctx.body = res; } async update() { const { ctx } = this; const res = await ctx.service.adminUser.update(ctx.request.body); ctx.body = res; } async del() { const { ctx } = this; const res = await ctx.service.adminUser.del(ctx.params); ctx.body = res; } async query() { const { ctx } = this; const res = await ctx.service.adminUser.query(ctx.query); ctx.body = res; } async pwdUpdate() { const { ctx } = this; const res = await ctx.service.adminUser.pwdUpdate(ctx.request.body); ctx.body = res; } } module.exports = AdminUserController;