Refactor return value in EnvelopeReceiverController
Modified the method to return a single item or null by using `SingleOrDefault()` on the result of `await _mediator.Send(...)`. This ensures the response is no longer a collection but a single object, improving clarity and aligning with expected behavior.
This commit is contained in:
@@ -89,7 +89,7 @@ public class EnvelopeReceiverController : ControllerBase
|
|||||||
Key = envelopeKey
|
Key = envelopeKey
|
||||||
}, cancel);
|
}, cancel);
|
||||||
|
|
||||||
return Ok(er);
|
return Ok(er.SingleOrDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user