Blog.Web.Api.Controllers.AccountController.SetPassword C# (CSharp) Method

SetPassword() private method

private SetPassword ( SetPasswordBindingModel model ) : Task
model Blog.Web.Api.Models.Account.Binding.SetPasswordBindingModel
return Task
        public async Task<IHttpActionResult> SetPassword(SetPasswordBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            var result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);

            return !result.Succeeded ? GetErrorResult(result) : Ok();
        }