fix/ Nom de la méthode ArtisteFactory modifié. Changement du nom du dossier Controller en Controllers. Changement des imports de bootstrap
This commit is contained in:
32
Webzine.WebApplication/Controllers/ApiController.cs
Normal file
32
Webzine.WebApplication/Controllers/ApiController.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 string HelloWorld()
|
||||
{
|
||||
return "Hello World !";
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Version()
|
||||
{
|
||||
this._logger.LogInformation("Get Version was called");
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
nom = "webzine",
|
||||
version = "1.0",
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user