Bit.Api.Controllers.AccountsController.PostEmailToken C# (CSharp) Method

PostEmailToken() private method

private PostEmailToken ( [ model ) : System.Threading.Tasks.Task
model [
return System.Threading.Tasks.Task
        public async Task PostEmailToken([FromBody]EmailTokenRequestModel model)
        {
            if(!await _userManager.CheckPasswordAsync(_currentContext.User, model.MasterPasswordHash))
            {
                await Task.Delay(2000);
                throw new BadRequestException("MasterPasswordHash", "Invalid password.");
            }

            await _userService.InitiateEmailChangeAsync(_currentContext.User, model.NewEmail);
        }