This commit is contained in:
2020-05-23 21:19:01 +00:00
parent fe870ead65
commit 23aa3e94ef

View File

@@ -109,21 +109,21 @@ namespace AyaNova.Api.Controllers
//Iterate all log files and build return //Iterate all log files and build return
var files = System.IO.Directory.GetFiles(ServerBootConfig.AYANOVA_LOG_PATH, "log-ayanova*.txt"); var files = System.IO.Directory.GetFiles(ServerBootConfig.AYANOVA_LOG_PATH, "log-ayanova*.txt");
Newtonsoft.Json.Linq.JObject o = Newtonsoft.Json.Linq.JObject.FromObject(new // Newtonsoft.Json.Linq.JObject o = Newtonsoft.Json.Linq.JObject.FromObject(new
{ // {
logs = // logs =
from f in files // from f in files
orderby f // orderby f
select new // select new
{ // {
logName = System.IO.Path.GetFileName(f) // logName = System.IO.Path.GetFileName(f)
} // }
}); // });
return Ok(ApiOkResponse.Response(o)); return Ok(ApiOkResponse.Response(files.OrderByDescending(z => z).Select(z => System.IO.Path.GetFileName(z)).ToList()));
} }