Skip to content

Commit

Permalink
Fix logging for legacy endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceredron committed Feb 6, 2025
1 parent 9e3fc5b commit 9e0457a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Altinn.Broker.API/Controllers/LegacyFileController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task<ActionResult> 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");
Expand All @@ -85,17 +85,17 @@ CancellationToken cancellationToken
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("{fileId}")]
[Route("{fileTransferId}")]
public async Task<ActionResult<LegacyFileOverviewExt>> 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);
Expand Down Expand Up @@ -154,17 +154,17 @@ public async Task<ActionResult<List<Guid>>> GetFiles(
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("{fileId}/download")]
[Route("{fileTransferId}/download")]
public async Task<ActionResult> 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);
Expand All @@ -179,17 +179,17 @@ public async Task<ActionResult> DownloadFile(
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("{fileId}/confirmdownload")]
[Route("{fileTransferId}/confirmdownload")]
public async Task<ActionResult> 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);
Expand Down

0 comments on commit 9e0457a

Please sign in to comment.