public async Task <ResultServiceModel <CheckForgotPinViewModel> > CheckForgotPin(DateTime birthday, string email) { CheckForgotPinCommand model = new CheckForgotPinCommand() { Birthday = birthday, Email = email }; string url = serviceUrl + "CheckForgotPin"; return(await Post <CheckForgotPinViewModel>(url, model)); }
public IActionResult CheckForgotPin([FromBody] CheckForgotPinCommand forgotPinCommand) { bool isUser = _userService.CheckUserByEmailAndBirthday(forgotPinCommand.Email, forgotPinCommand.Birthday); if (!isUser) { return(NoContent()); } string refNumber = _authService.SaveOtp(forgotPinCommand.Email); if (string.IsNullOrEmpty(refNumber)) { return(BadRequest()); } CheckForgotPinViewModel checkForgot = new CheckForgotPinViewModel { RefNumber = refNumber }; return(Ok(checkForgot)); }