Пример #1
0
        public IActionResult ResendOTP([FromQuery] string username)
        {
            OTPService service = new OTPService(configuration.GetConnectionString("MAF"));
            MobileOTP  oTP;

            try
            {
                oTP = service.GetOTP(username);
                SMSHelper helper = new SMSHelper(configuration);
                helper.Send(oTP.MobileNo, oTP.OTP);
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }

            return(Ok());
        }