From a0c3e66dc1cc64fe12cd43d3897e7a5d217368d3 Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Tue, 17 Jan 2023 15:33:01 -0700 Subject: [PATCH] Fixed a typo in appsettings.Development.json file for API and setting base URL in the planning report controller. --- ReportingServices.API/appsettings.Development.json | 6 +++--- .../Controllers/PlanningReportController.cs | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ReportingServices.API/appsettings.Development.json b/ReportingServices.API/appsettings.Development.json index 06934ea..11e75b0 100644 --- a/ReportingServices.API/appsettings.Development.json +++ b/ReportingServices.API/appsettings.Development.json @@ -12,20 +12,20 @@ { "Name": "Debug", "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", "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", "Args": { "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" } } diff --git a/ReportingServices.UI/Controllers/PlanningReportController.cs b/ReportingServices.UI/Controllers/PlanningReportController.cs index b5822a0..88675b0 100644 --- a/ReportingServices.UI/Controllers/PlanningReportController.cs +++ b/ReportingServices.UI/Controllers/PlanningReportController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using ReportingServices.Shared.HelperClasses; using ReportingServices.Shared.Models.PlanningReport; +using ReportingServices.UI.Models; namespace ReportingServices.UI.Controllers; @@ -9,10 +10,10 @@ public class PlanningReportController : Controller private readonly ILogger _logger; private readonly string _baseUrl; - public PlanningReportController(ILogger logger) + public PlanningReportController(ILogger logger, AppSettings appSettings) { _logger = logger; - _baseUrl = "http://localhost:50201/api/" + "ScrapeDB/"; + _baseUrl = appSettings.BaseAPIAddress; _logger.LogInformation("Base API Address: {baseUrl}", _baseUrl); }