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:
@@ -110,6 +110,8 @@ public class HistoryController : ControllerBase
|
||||
bool withReceiver = false;
|
||||
bool withSender = false;
|
||||
|
||||
|
||||
|
||||
switch (history.Related)
|
||||
{
|
||||
case ReferenceType.Receiver:
|
||||
|
||||
Reference in New Issue
Block a user