mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-14 01:00:01 +08:00
优化:优化后端公共 CRUD 组件-修改接口,将 id 从请求体提取到路径变量,更符合 RESTful 风格
This commit is contained in:
@@ -74,9 +74,8 @@ public class UserCenterController {
|
||||
@PatchMapping("/basic/info")
|
||||
public R updateBasicInfo(@Validated @RequestBody UpdateBasicInfoRequest updateBasicInfoRequest) {
|
||||
UserRequest userRequest = new UserRequest();
|
||||
userRequest.setId(LoginHelper.getUserId());
|
||||
BeanUtil.copyProperties(updateBasicInfoRequest, userRequest);
|
||||
userService.update(userRequest);
|
||||
userService.update(userRequest, LoginHelper.getUserId());
|
||||
return R.ok("修改成功");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user