UserController.ts 338 B

123456789101112131415
  1. import UserService from '../service/UserService';
  2. class UserController {
  3. private service: UserService = new UserService();
  4. login = async (ctx) => {
  5. ctx.body = await this.service.login();
  6. };
  7. getUserInfoById = async (ctx) => {
  8. ctx.body = await this.service.getUserInfoById();
  9. };
  10. }
  11. export default new UserController();