This commit is contained in:
2020-04-06 22:01:39 +00:00
parent ba1c0c41e7
commit 08292742a4

View File

@@ -70,17 +70,16 @@ namespace AyaNova.Api.Controllers
/// <summary> /// <summary>
/// Get License info /// Get Trial status of license
/// </summary> /// </summary>
/// <returns>Information about the currently installed license in AyaNova</returns> /// <returns>True if a trial license</returns>
[AllowAnonymous] [AllowAnonymous]
[HttpGet("trial")] [HttpGet("trial")]
public ActionResult GetTrialFlag() public ActionResult GetTrialFlag()
{ {
//note: this route is called by the client as the first action so it also acts like a ping to see if the server is up as well
if (serverState.IsClosed) if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
return Ok(ApiOkResponse.Response(AyaNova.Core.License.ActiveKey.TrialLicense, true)); return Ok(ApiOkResponse.Response(AyaNova.Core.License.ActiveKey.TrialLicense, true));
} }