Add Related property to ReadHistoryQuery and update controller

The `ReadHistoryQuery` record now includes a computed `Related` property that determines the context of the record based on the `Status` value. The constructor has been updated to remove the `Related` parameter.

Additionally, the `GetAllAsync` method in `HistoryController` has been modified to handle the `Related` property, setting the `withReceiver` boolean when the value is `ReferenceType.Receiver`.
This commit is contained in:
Developer 02
2025-05-12 09:57:14 +02:00
parent 1d74b7ca06
commit 8b1199bc71
2 changed files with 23 additions and 3 deletions

View File

@@ -110,6 +110,8 @@ public class HistoryController : ControllerBase
bool withReceiver = false;
bool withSender = false;
switch (history.Related)
{
case ReferenceType.Receiver: