mirror of
https://github.com/certd/certd.git
synced 2026-04-16 05:50:50 +08:00
perf: 添加用户资料编辑功能
- 新增用户资料编辑对话框组件 - 添加后端更新用户资料接口 - 在用户信息页面添加编辑按钮 - 新增中英文翻译字段 - 实现头像上传和昵称修改功能
This commit is contained in:
@@ -32,4 +32,15 @@ export class MineController extends BaseController {
|
||||
await this.userService.changePassword(userId, body);
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
@Post('/updateProfile', { summary: Constants.per.authOnly })
|
||||
public async updateProfile(@Body(ALL) body: any) {
|
||||
const userId = this.getUserId();
|
||||
|
||||
await this.userService.updateProfile(userId, {
|
||||
avatar: body.avatar,
|
||||
nickName: body.nickName,
|
||||
});
|
||||
return this.ok({});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user