diff --git a/src/FunderMaps.Webservice/Controllers/ProductController.cs b/src/FunderMaps.Webservice/Controllers/ProductController.cs index 0a3235e2..6c3db1f5 100644 --- a/src/FunderMaps.Webservice/Controllers/ProductController.cs +++ b/src/FunderMaps.Webservice/Controllers/ProductController.cs @@ -10,7 +10,7 @@ namespace FunderMaps.Webservice.Controllers; /// Controller for all product endpoints. /// [Route("api/v3/product")] -public sealed class ProductController(ModelService modelService) : FunderMapsController +public sealed class ProductController(ModelService modelService, ILogger logger) : FunderMapsController { // GET: api/v3/product/analysis /// @@ -30,13 +30,16 @@ public Task GetAnalysisAsync(string id) public Task GetStatisticsAsync(string id) => modelService.GetStatisticsAsync(id, TenantId); - // TODO: LEGACY // GET: api/v3/product/analysis [Authorize(Roles = "Service, Administrator")] [HttpGet("analysis")] public Task GetAnalysisLegacyAsync([FromQuery] string id) - => GetAnalysisAsync(id); + { + logger.LogWarning("Legacy endpoint called: {Endpoint}", HttpContext.Request.Path); + + return GetAnalysisAsync(id); + } // TODO: LEGACY // GET: api/v3/product/statistics @@ -46,5 +49,9 @@ public Task GetAnalysisLegacyAsync([FromQuery] string id) [Authorize(Roles = "Service,Administrator")] [HttpGet("statistics")] public Task GetStatisticsLegacyAsync([FromQuery] string id) - => GetStatisticsAsync(id); + { + logger.LogWarning("Legacy endpoint called: {Endpoint}", HttpContext.Request.Path); + + return GetStatisticsAsync(id); + } }