public async Task <IHttpActionResult> PostMudarSenha(SenhaModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.SenhaVelha, model.SenhaNova); var errorResult = GetErrorResult(result); return(errorResult ?? Ok()); }
public async Task<IHttpActionResult> PostMudarSenha(SenhaModel model) { if (!ModelState.IsValid) return BadRequest(ModelState); var result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.SenhaVelha, model.SenhaNova); var errorResult = GetErrorResult(result); return errorResult ?? Ok(); }