Exemple #1
0
        public async Task <ActionResult <List <BaseConfigDTO> > > GetDetailsImagesConfig()
        {
            var     filepath = Path.Combine(Directory.GetCurrentDirectory(), "config/detailsPic.json");
            JObject jObject  = await JsonFileHelper.GetConfig <JObject>(filepath);

            string data = jObject.GetValue("data").ToString();
            List <BaseConfigDTO> baseConfigs = JsonConvert.DeserializeObject <List <BaseConfigDTO> >(data);

            return(Ok(baseConfigs));
        }
Exemple #2
0
        public async Task <ActionResult <IndexVideoConfigDTO> > GetIndexVideoOrImageConfig()
        {
            var     filepath = Path.Combine(Directory.GetCurrentDirectory(), "config/indexVideo.json");
            JObject jObject  = await JsonFileHelper.GetConfig <JObject>(filepath);

            string data = jObject.GetValue("data").ToString();
            IndexVideoConfigDTO baseConfigs = JsonConvert.DeserializeObject <IndexVideoConfigDTO>(data);

            return(Ok(baseConfigs));
        }