提交 | 用户 | age | ||
a96cb2 | 1 | import UserService from '../service/UserService'; |
V | 2 | |
3 | class UserController { | |
4 | private service: UserService = new UserService(); | |
5 | ||
6 | login = async (ctx) => { | |
7 | ctx.body = await this.service.login(); | |
8 | }; | |
9 | ||
10 | getUserInfoById = async (ctx) => { | |
11 | ctx.body = await this.service.getUserInfoById(); | |
12 | }; | |
13 | } | |
14 | ||
15 | export default new UserController(); |