Skip to content

Commit c83640c

Browse files
author
pedro
committed
feat:添加user information接口
1 parent 9b77d42 commit c83640c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

app/api/cms/user.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,21 @@ user.linGet(
148148
}
149149
);
150150

151+
user.linGet(
152+
'getInformation',
153+
'/information',
154+
{
155+
auth: '查询自己信息',
156+
module: '用户',
157+
mount: false
158+
},
159+
loginRequired,
160+
async ctx => {
161+
const user = ctx.currentUser;
162+
ctx.json(user);
163+
}
164+
);
165+
151166
user.put('/avatar', loginRequired, async ctx => {
152167
const v = await new AvatarUpdateValidator().validate(ctx);
153168
const avatar = v.get('body.avatar');

0 commit comments

Comments
 (0)