Add test environment variables
This commit is contained in:
@@ -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"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user