Browse Source

Ping Controller fixed.

pull/329/head
Sebastian Stehle 7 years ago
parent
commit
5632c20216
  1. 24
      src/Squidex/Areas/Api/Controllers/Ping/PingController.cs

24
src/Squidex/Areas/Api/Controllers/Ping/PingController.cs

@ -15,10 +15,7 @@ namespace Squidex.Areas.Api.Controllers.Ping
/// <summary> /// <summary>
/// Makes a ping request. /// Makes a ping request.
/// </summary> /// </summary>
[ApiAuthorize]
[ApiExceptionFilter] [ApiExceptionFilter]
[AppApi]
[MustBeAppReader]
[SwaggerTag(nameof(Ping))] [SwaggerTag(nameof(Ping))]
public sealed class PingController : ApiController public sealed class PingController : ApiController
{ {
@ -27,6 +24,22 @@ namespace Squidex.Areas.Api.Controllers.Ping
{ {
} }
/// <summary>
/// Get ping status of the API.
/// </summary>
/// <returns>
/// 204 => Service ping successful.
/// </returns>
/// <remarks>
/// Can be used to test, if the Squidex API is alive and responding.
/// </remarks>
[HttpGet]
[Route("ping/")]
public IActionResult GetPing()
{
return NoContent();
}
/// <summary> /// <summary>
/// Get ping status. /// Get ping status.
/// </summary> /// </summary>
@ -37,9 +50,12 @@ namespace Squidex.Areas.Api.Controllers.Ping
/// <remarks> /// <remarks>
/// Can be used to test, if the Squidex API is alive and responding. /// Can be used to test, if the Squidex API is alive and responding.
/// </remarks> /// </remarks>
[ApiAuthorize]
[ApiCosts(0)]
[AppApi]
[MustBeAppReader]
[HttpGet] [HttpGet]
[Route("ping/{app}/")] [Route("ping/{app}/")]
[ApiCosts(0)]
public IActionResult GetPing(string app) public IActionResult GetPing(string app)
{ {
return NoContent(); return NoContent();

Loading…
Cancel
Save