public async Task <IActionResult> AddConfiguration(TeleBillingUtility.Models.Configuration configuration)
        {
            string userId   = HttpContext.User.Claims.FirstOrDefault(c => c.Type == "user_id").Value;
            string fullname = HttpContext.User.Claims.FirstOrDefault(c => c.Type == "fullname").Value;

            return(Ok(await _iConfigurationRepository.AddConfiguration(Convert.ToInt64(userId), configuration, fullname)));
        }
        public async Task <Configuration> AddConfiguration(Configuration configuration)
        {
            if (!_configurationValidator.IsConfigurationValid(configuration))
            {
                throw new Exception("Configuration with same details found, please add different configuration" + configuration);
            }

            return(await _configurationRepository.AddConfiguration(configuration));
        }
Example #3
0
        public void Post(Configuration configuration)
        {
            _configurationRepository.AddConfiguration(configuration);

            //add rabbitMQ
        }
Example #4
0
 public async Task <Configuration> AddConfiguration(Configuration configuration)
 {
     return(await _configurationRepository.AddConfiguration(configuration));
 }