This commit is contained in:
2022-06-22 03:18:13 +00:00
parent 729fbf33ae
commit a4cd6b839f

View File

@@ -299,22 +299,6 @@ namespace AyaNova.Api.Controllers
return NoContent();
}
/// <summary>
/// Get status of licensed integration feature
/// </summary>
/// <param name="feature">Integration feature name</param>
/// <returns>true if feature is available</returns>
[HttpGet("has-feature/{feature}")]
public ActionResult GetHasLicensedFeature([FromRoute] string feature)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//any authenticated user can check if a feature is available since we don't know what optional add-on's will be created in future and for which roles
//safest and logical to just work for any logged in user
return Ok(ApiOkResponse.Response(AyaNova.Core.License.ActiveKey.HasLicenseFeature(feature)));
}
//------------------------------------------------------