Add user chang password api

This commit is contained in:
2024-02-22 18:21:36 +08:00
parent 874235ed05
commit 5ea9203a08
11 changed files with 91 additions and 11 deletions

View File

@@ -51,6 +51,20 @@ class UserController(
if (userService.updateInfo(userInfoUpdateParam)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_UPDATE_SUCCESS)
else ResponseResult.databaseSuccess(ResponseCode.DATABASE_UPDATE_FAILED)
/**
* Change password
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Operation(summary = "更改密码")
@PostMapping("info")
fun password(@RequestBody @Valid userChangePasswordParam: UserChangePasswordParam): ResponseResult<Nothing> {
userService.password(userChangePasswordParam)
return ResponseResult.databaseSuccess(ResponseCode.DATABASE_UPDATE_SUCCESS)
}
/**
* Get user by ID
*