Updated appsettings.json file to change base api url based on environment. Also fixed bug in calculation of yield percentage.

This commit is contained in:
Daniel Wathen
2023-01-05 15:10:40 -07:00
parent 3922d28a8b
commit 6de41bc8da
7 changed files with 49 additions and 33 deletions

View File

@ -6,7 +6,14 @@ namespace ReportingServices.UI.Controllers
{
public class PlanningReportController : Controller
{
private readonly string _baseUrl = "https://localhost:7196/api/ScrapeDB/";
private readonly IConfiguration _configuration;
private readonly string _baseUrl;
public PlanningReportController(IConfiguration configuration)
{
_configuration = configuration;
_baseUrl = _configuration.GetValue<string>("BaseAPIAddress") + "ScrapeDB/";
}
public IActionResult Index()
{