Add test environment variables

This commit is contained in:
2023-01-06 18:36:24 +01:00
parent acc2c67688
commit 8999405dca
7 changed files with 18 additions and 4 deletions

View File

@@ -18,11 +18,19 @@ namespace WebAPI.Controllers
[Authorize]
public class PingController : Controller
{
private readonly IConfiguration configuration;
public PingController(
IConfiguration _configuration)
{
configuration = _configuration;
}
[HttpGet]
[Route("Ping")]
[AllowAnonymous]
public IActionResult Ping()
{
return Ok(new { data = "Pong" });
return Ok(configuration["PONG"]);
}
}
}