Skip to content

Commit 888ee96

Browse files
rickyesJacksonTian
authored andcommitted
refactor: remove the ctx (#141)
1 parent 807a0b8 commit 888ee96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controller/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class UserController extends Controller {
1010
async index() {
1111
const { ctx, service, config } = this;
1212
const user_name = ctx.params.name;
13-
const user = await ctx.service.user.getUserByLoginName(user_name);
13+
const user = await service.user.getUserByLoginName(user_name);
1414
if (!user) {
1515
ctx.status = 404;
1616
ctx.message = '这个用户不存在。';

0 commit comments

Comments
 (0)