This commit is contained in:
2020-12-15 21:45:29 +00:00
parent d99115b5b9
commit f0a01d6086
3 changed files with 19 additions and 1 deletions

View File

@@ -363,6 +363,22 @@ namespace AyaNova.Api.Controllers
/// <summary>
/// Fetch super user status
///
/// </summary>
/// <returns>true or false</returns>
[HttpGet("amsu")]
public ActionResult GetAMSU()
{
//This is used by v8 migrate so it doesn't need to decode web tokens
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
return Ok(ApiOkResponse.Response(UserIdFromContext.Id(HttpContext.Items)==1));
}
//------------
}//eoc