diff --git a/src/presentation/DigitalData.TaskFlow.API/Controllers/DocumentsController.cs b/src/presentation/DigitalData.TaskFlow.API/Controllers/DocumentsController.cs index 83dd1d5..b775a05 100644 --- a/src/presentation/DigitalData.TaskFlow.API/Controllers/DocumentsController.cs +++ b/src/presentation/DigitalData.TaskFlow.API/Controllers/DocumentsController.cs @@ -27,13 +27,7 @@ public sealed class DocumentsController(ISender sender) : ControllerBase public async Task GetAsync([FromRoute] string id, CancellationToken cancellationToken) { var response = await sender.Send(new GetDocumentQuery(id), cancellationToken); - var data = response.Data; - - if (data is null) - { - return NotFound(response); - } - + var data = response.Data ?? throw new InvalidOperationException("Document payload is unexpectedly null."); return File(data.Content, data.ContentType, data.FileName); } } diff --git a/src/presentation/DigitalData.TaskFlow.API/appsettings.json b/src/presentation/DigitalData.TaskFlow.API/appsettings.json index 3f3cd8f..7d93c52 100644 --- a/src/presentation/DigitalData.TaskFlow.API/appsettings.json +++ b/src/presentation/DigitalData.TaskFlow.API/appsettings.json @@ -8,6 +8,10 @@ "Swagger": { "EnabledInProduction": false }, + "Database": { + "CommandTimeoutSeconds": 30, + "WorkflowListingObjectType": "Ferdinand" + }, "Logging": { "LogLevel": { "Default": "Information",