private PostEmailToken ( [ model ) : System.Threading.Tasks.Task | ||
model | [ | |
리턴 | 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);
}