netmash/Netmash.Test.Api/Controllers/DebugController.cs

34 lines
825 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
2023-01-12 01:01:36 +02:00
namespace Netmash.Test.Api.Controllers
{
[Authorize]
[ApiController]
[Route("[controller]")]
public class DebugController : ControllerBase
{
private readonly ILogger<DebugController> _logger;
public DebugController(ILogger<DebugController> logger)
{
_logger = logger;
}
[AllowAnonymous]
[HttpGet("ping")]
public IActionResult Ping()
{
return Ok($"Ping success. System datetime: {DateTime.Now}");
}
[HttpGet("ping-auth")]
public IActionResult PingAuth()
{
return Ok($"Secured ping success. System datetime: {DateTime.Now}");
}
}
}