Refactor EnvelopeDto and improve response handling

Updated the `EnvelopeDto` class by removing several properties to simplify the data structure and added `AddedWhen`, `ChangedWhen`, and a nullable `EnvelopeType`.

Modified the return statement in `EnvelopeController.cs` to return `NotFound()` when no envelopes are present, enhancing the accuracy of HTTP responses.
This commit is contained in:
Developer 02
2025-05-12 09:19:12 +02:00
parent fd53f5bfd6
commit 4401a70217
2 changed files with 4 additions and 22 deletions

View File

@@ -74,7 +74,7 @@ public class EnvelopeController : ControllerBase
if (envelope.Uuid is string uuid)
envelopes = envelopes.Where(e => e.Uuid == uuid);
return Ok(envelopes);
return envelopes.Any() ? Ok(envelopes) : NotFound();
},
Fail: IActionResult (msg, ntc) =>
{