This commit is contained in:
2020-06-21 20:06:07 +00:00
parent 4edbecd544
commit 75f5ce01a8
8 changed files with 153 additions and 9 deletions

View File

@@ -82,8 +82,10 @@ namespace AyaNova.Api.Controllers
[HttpGet("status/{gid}")]
public async Task<IActionResult> GetJobStatus([FromRoute] Guid gid)
{
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//this is called from things that might be running and have server temporarily locked down (e.g. seeding)
//so it should never return an error on closed
// if (serverState.IsClosed)
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//This is called by the UI to monitor any operation that triggers a job so it really should be available to any logged in user
// if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerJob))