public async Task <IActionResult> ConfirmCodes([FromBody] CodesDTO codes)
        {
            //var sendNotification = Task.Run(new Action(() => _notificationService.SendNotification("CODES_GENERATED", user, loanRequest)));
            var sendNotification = await _notificationService.SendNotificationAsync("CONFIRM_CODES", codes);

            return(Ok(new
            {
                Message = "Codigos confirmados satisfactoriamente",
                ShowMessage = true,
            }));
        }
        public async Task <IActionResult> CreateCodes([FromBody] CodesDTO codes)
        {
            var random = new Random();

            var emailcode = random.Next(0, 999999).ToString("D6");
            var smscode   = random.Next(0, 999999).ToString("D6");

            codes.EmailCode     = emailcode;
            codes.CellphoneCode = smscode;

            //var sendNotification = Task.Run(new Action(() => _notificationService.SendNotification("CODES_GENERATED", user, loanRequest)));
            var sendNotification = await _notificationService.SendNotificationAsync("CODES_GENERATED", codes);

            return(Ok(new
            {
                Message = "Revisa tu correo y tu celular e ingresa los códigos que te enviamos. Algunas veces el correo llega a spam",
                Data = codes,
                ShowMessage = true,
            }));
        }