Files
webzine/Webzine.WebApplication/Controllers/ApiController.cs

26 lines
598 B
C#

using Microsoft.AspNetCore.Mvc;
namespace Webzine.WebApplication.Controllers;
public class ApiController : ControllerBase
{
private readonly ILogger<ApiController> _logger;
public ApiController(ILogger<ApiController> logger)
{
this._logger = logger;
this._logger.LogDebug(1, "NLog injected into VersionController");
}
[HttpGet]
public IActionResult Version()
{
this._logger.LogInformation("Get Version was called");
return Ok(new
{
nom = "webzine",
version = "1.0",
});
}
}