Exemple #1
0
        public async Task <IActionResult> Send(SmsViewModel model)
        {
            try
            {
                var(isSucc, errMsg) = await client.SendVerification(model.Code, 10, model.Phone);

                ModelState.AddModelError("", errMsg);
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.ToString());
            }

            return(View("Index", model));
        }