コード例 #1
0
        public async Task <ActionResult> ChangePassword([FromBody] ChangePasswordModel passwordModel)
        {
            var result = await _service.ChangePasswordAsync(User.GetUserId(), passwordModel.CurrentPassword, passwordModel.Password);

            if (!result.Sucess)
            {
                BadRequest(result.Errors);
            }

            return(Ok());
        }