Created appsettings class to pull from appsettings.json files
This commit is contained in:
@ -2,20 +2,23 @@
|
||||
using ReportingServices.Shared.HelperClasses;
|
||||
using ReportingServices.Shared.Models.ProductionReport;
|
||||
using ReportingServices.Shared.ViewModels.ProductionReport;
|
||||
using ReportingServices.UI.Models;
|
||||
|
||||
namespace ReportingServices.UI.Controllers;
|
||||
|
||||
public class ProductionReportController : Controller
|
||||
{
|
||||
private readonly ILogger<ProductionReportController> _logger;
|
||||
private readonly string _dailyRptFilePath = "wwwroot/Assets/DailyReportInfo.json";
|
||||
private readonly string _toolStateOwnerFilePath = "wwwroot/Assets/ToolStates.json";
|
||||
private readonly string _dailyRptFilePath;
|
||||
private readonly string _toolStateOwnerFilePath;
|
||||
private readonly string _baseDBUrl;
|
||||
|
||||
public ProductionReportController(ILogger<ProductionReportController> logger)
|
||||
public ProductionReportController(ILogger<ProductionReportController> logger, AppSettings appSettings)
|
||||
{
|
||||
_logger = logger;
|
||||
_baseDBUrl = "http://localhost:50201/api/ScrapeDB/";
|
||||
_baseDBUrl = appSettings.BaseAPIAddress;
|
||||
_dailyRptFilePath = appSettings.DailyReportFilePath;
|
||||
_toolStateOwnerFilePath = appSettings.ToolStateOwnerFilePath;
|
||||
|
||||
_logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl);
|
||||
}
|
||||
|
Reference in New Issue
Block a user