Files
webzine/Webzine.WebApplication/Controller/ApiController.cs
mirage 3db4a4c828 Merge branch 'dev' into J1/feat/titreControllerIHM
# Conflicts:
#	Webzine.WebApplication/Controller/AccueilController.cs
#	Webzine.WebApplication/Views/Shared/_Layout.cshtml
2026-03-05 10:34:45 +01:00

32 lines
687 B
C#

using Microsoft.AspNetCore.Mvc;
namespace Webzine.WebApplication.Controller;
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 string HelloWorld()
{
return "Hello World !";
}
[HttpGet]
public IActionResult Version()
{
this._logger.LogInformation("Get Version was called");
return Ok(new
{
nom = "webzine",
version = "1.0",
});
}
}