From 9e0457a90c9703312b0867e42f113b3c4f801f49 Mon Sep 17 00:00:00 2001 From: Roar Mjelde Date: Thu, 6 Feb 2025 09:13:19 +0100 Subject: [PATCH] Fix logging for legacy endpoints --- .../Controllers/LegacyFileController.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Altinn.Broker.API/Controllers/LegacyFileController.cs b/src/Altinn.Broker.API/Controllers/LegacyFileController.cs index 087c519f..74a4979e 100644 --- a/src/Altinn.Broker.API/Controllers/LegacyFileController.cs +++ b/src/Altinn.Broker.API/Controllers/LegacyFileController.cs @@ -61,7 +61,7 @@ public async Task UploadFileStreamed( CancellationToken cancellationToken ) { - logger.LogInformation("Legacy - Uploading file for file transfer {fileId}", fileTransferId.ToString()); + logger.LogInformation("Legacy - Uploading file for file transfer {fileTransferId}", fileTransferId.ToString()); if (Request.ContentLength is null) { return Problem("Content-length header is required"); @@ -85,17 +85,17 @@ CancellationToken cancellationToken /// /// [HttpGet] - [Route("{fileId}")] + [Route("{fileTransferId}")] public async Task> GetFileOverview( - Guid fileId, + Guid fileTransferId, [FromQuery] string onBehalfOfConsumer, [FromServices] GetFileTransferOverviewHandler handler, CancellationToken cancellationToken) { - logger.LogInformation("Legacy - Getting file overview for {fileId}", fileId.ToString()); + logger.LogInformation("Legacy - Getting file overview for {fileTransferId}", fileTransferId.ToString()); var queryResult = await handler.Process(new GetFileTransferOverviewRequest() { - FileTransferId = fileId, + FileTransferId = fileTransferId, IsLegacy = true, OnBehalfOfConsumer = onBehalfOfConsumer }, HttpContext.User, cancellationToken); @@ -154,17 +154,17 @@ public async Task>> GetFiles( /// /// [HttpGet] - [Route("{fileId}/download")] + [Route("{fileTransferId}/download")] public async Task DownloadFile( - Guid fileId, + Guid fileTransferId, [FromQuery] string onBehalfOfConsumer, [FromServices] DownloadFileHandler handler, CancellationToken cancellationToken) { - logger.LogInformation("Downloading file {fileId}", fileId.ToString()); + logger.LogInformation("Downloading file {fileTransferId}", fileTransferId.ToString()); var queryResult = await handler.Process(new DownloadFileRequest() { - FileTransferId = fileId, + FileTransferId = fileTransferId, IsLegacy = true, OnBehalfOfConsumer = onBehalfOfConsumer }, HttpContext.User, cancellationToken); @@ -179,17 +179,17 @@ public async Task DownloadFile( /// /// [HttpPost] - [Route("{fileId}/confirmdownload")] + [Route("{fileTransferId}/confirmdownload")] public async Task ConfirmDownload( - Guid fileId, + Guid fileTransferId, [FromQuery] string onBehalfOfConsumer, [FromServices] ConfirmDownloadHandler handler, CancellationToken cancellationToken) { - logger.LogInformation("Confirming download for file {fileId}", fileId.ToString()); + logger.LogInformation("Confirming download for file {fileTransferId}", fileTransferId.ToString()); var commandResult = await handler.Process(new ConfirmDownloadRequest() { - FileTransferId = fileId, + FileTransferId = fileTransferId, IsLegacy = true, OnBehalfOfConsumer = onBehalfOfConsumer }, HttpContext.User, cancellationToken);