// ==========================================================================
// PingController.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Squidex.Infrastructure.CQRS.Commands;
using Squidex.Pipeline;
namespace Squidex.Areas.Api.Controllers.Ping
{
///
/// Makes a ping request.
///
[ApiAuthorize]
[ApiExceptionFilter]
[AppApi]
[MustBeAppReader]
[SwaggerTag(nameof(Ping))]
public sealed class PingController : ApiController
{
public PingController(ICommandBus commandBus)
: base(commandBus)
{
}
///
/// Get ping status.
///
/// The name of the app.
///
/// 204 => Service ping successful.
///
///
/// Can be used to test, if the Squidex API is alive and responding.
///
[HttpGet]
[Route("ping/{app}/")]
[ApiCosts(0)]
public IActionResult GetPing(string app)
{
return NoContent();
}
}
}