Fixed a typo in appsettings.Development.json file for API and setting base URL in the planning report controller.

This commit is contained in:
Daniel Wathen 2023-01-17 15:33:01 -07:00
parent 94ea7502a3
commit a0c3e66dc1
2 changed files with 6 additions and 5 deletions

View File

@ -12,20 +12,20 @@
{ {
"Name": "Debug", "Name": "Debug",
"Args": { "Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName} ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
} }
}, },
{ {
"Name": "Console", "Name": "Console",
"Args": { "Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName} ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
} }
}, },
{ {
"Name": "File", "Name": "File",
"Args": { "Args": {
"path": "%workingDirectory% - Log/log-.txt", "path": "%workingDirectory% - Log/log-.txt",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName} ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}", "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}",
"rollingInterval": "Hour" "rollingInterval": "Hour"
} }
} }

View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using ReportingServices.Shared.HelperClasses; using ReportingServices.Shared.HelperClasses;
using ReportingServices.Shared.Models.PlanningReport; using ReportingServices.Shared.Models.PlanningReport;
using ReportingServices.UI.Models;
namespace ReportingServices.UI.Controllers; namespace ReportingServices.UI.Controllers;
@ -9,10 +10,10 @@ public class PlanningReportController : Controller
private readonly ILogger<PlanningReportController> _logger; private readonly ILogger<PlanningReportController> _logger;
private readonly string _baseUrl; private readonly string _baseUrl;
public PlanningReportController(ILogger<PlanningReportController> logger) public PlanningReportController(ILogger<PlanningReportController> logger, AppSettings appSettings)
{ {
_logger = logger; _logger = logger;
_baseUrl = "http://localhost:50201/api/" + "ScrapeDB/"; _baseUrl = appSettings.BaseAPIAddress;
_logger.LogInformation("Base API Address: {baseUrl}", _baseUrl); _logger.LogInformation("Base API Address: {baseUrl}", _baseUrl);
} }