This commit is contained in:
2022-01-03 19:48:44 +00:00
parent f78ce69473
commit 1174a06cb3
2 changed files with 4 additions and 7 deletions

View File

@@ -53,8 +53,7 @@ namespace AyaNova.Api.Controllers
[HttpGet("{logname}")]
public ActionResult GetLog([FromRoute] string logname)
{
// if (serverState.IsClosed)
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//NOTE: this route deliberately open even when server closed as a troubleshooting measure
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.LogFile))
{
@@ -93,8 +92,7 @@ namespace AyaNova.Api.Controllers
[HttpGet()]
public ActionResult ListLogs()
{
// if (serverState.IsClosed)
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//NOTE: this route deliberately open even when server closed as a troubleshooting measure
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.LogFile))
{
@@ -126,8 +124,7 @@ namespace AyaNova.Api.Controllers
[HttpGet("download/{logname}")]
public async Task<IActionResult> DownloadLog([FromRoute] string logname, [FromQuery] string t)
{
// if (serverState.IsClosed)
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//NOTE: this route deliberately open even when server closed as a troubleshooting measure
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));