Exemplo n.º 1
0
        public JObject SaveConfig()
        {
            var model = _httpContextProxy.GetRequestBody <JObject>();

            if (model == null)
            {
                return(_responseBuilder.BadRequest());
            }

            _appSettingService.SetAppSetting(CommonConst.CommonField.SMTP_SERVER, model["smtp_address"].ToString());
            _appSettingService.SetAppSetting(CommonConst.CommonField.SMTP_SERVER_PORT, model["smtp_port"].ToString());
            _appSettingService.SetAppSetting(CommonConst.CommonField.SMTP_SERVER_USER, model["smtp_user"].ToString());
            _appSettingService.SetAppSetting(CommonConst.CommonField.SMTP_SERVER_PASSWORD, model["smtp_pass"].ToString());
            _appSettingService.SetAppSetting(CommonConst.CommonField.FROM_EMAIL_ID, model["from_email"].ToString());
            _appSettingService.SetAppSetting("sms_gateway_key", model["sms_gateway_key"].ToString());
            _appSettingService.SetAppSetting("gateway_endpoint", model["sms_gateway_endpoint"].ToString());
            _appSettingService.SetAppSetting("sms_from", model["sms_from"].ToString());
            _appSettingService.SetAppSetting("sms_provider", model["sms_provider"].ToString());
            return(_responseBuilder.Success());
        }