using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using TEAMModelOS.Helper.Common.FileHelper; using TEAMModelOS.SDK.Extension.DataResult.JsonRpcResponse; namespace TEAMModelOS.Starter.CloudServer.Controllers.AnalysisControllers { [Route("api/[controller]")] [ApiController] public class ClassController: Controller { IHostingEnvironment _hostingEnvironment; public ClassController(IHostingEnvironment hostingEnvironment) { _hostingEnvironment = hostingEnvironment; } [HttpGet("getClass")] public BaseJosnRPCResponse getClass(string identity) { string contentRootPath = _hostingEnvironment.ContentRootPath; identity = "json"; JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom(); string data = FileTool.getJson(contentRootPath,identity); builder.Data(data); return builder.build(); } } }