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)); }
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)); }