public ActionResult <GetInfo> Get(string name) { var response = new GetInfo { Name = name }; string docPath = pathServices.GetNamePath(name); if (Directory.Exists(docPath)) { response.Table = FileHelper.GetJson <List <InfoJsonColumn> >(Path.Combine(docPath, "table.json")); response.Info = FileHelper.GetJson <GetInfoJson>(Path.Combine(docPath, "info.json")); return(response); } return(null); }
public ActionResult <JsonExport> GetJSON(string name, DateTime?date) { if (!date.HasValue) { date = DateTime.Today; } var response = new JsonExport { Name = name }; string docPath = pathServices.GetNamePath(name); if (Directory.Exists(docPath)) { response.Info = FileHelper.GetJson <GetInfoJson>(Path.Combine(docPath, "info.json")); response.Json_data = GetTable(docPath, response.Info, date.Value); } return(response); }