Refactor claim handling and simplify controllers
Refactored multiple controllers (`AnnotationController`, `DocumentController`, `ReadOnlyController`, and `SignatureController`) to use updated claim extension methods (`ReceiverSignature`, `EnvelopeUuid`, etc.), replacing older, verbose methods for improved readability and consistency. Removed the `EnvelopeClaimTypes` class and replaced claim type constants with `EnvelopeClaimNames`. Simplified claim retrieval logic in `ReceiverClaimExtensions` by consolidating methods and removing redundant or unused functionality. Eliminated the `SignInEnvelopeAsync` method, indicating a shift away from manual claim management. Performed general cleanup, including removing obsolete code and improving exception messages for better debugging context.
This commit is contained in:
@@ -38,9 +38,9 @@ public class SignatureController : ControllerBase
|
||||
[HttpGet("{envelopeKey}")]
|
||||
public async Task<IActionResult> GetAnnotsOfReceiver(string envelopeKey, CancellationToken cancel)
|
||||
{
|
||||
int envelopeId = User.GetEnvelopeIdOfReceiver();
|
||||
int envelopeId = User.EnvelopeId();
|
||||
|
||||
int receiverId = User.GetReceiverIdOfReceiver();
|
||||
int receiverId = User.ReceiverId();
|
||||
|
||||
var doc = await _mediator.Send(new ReadDocumentQuery() { EnvelopeId = envelopeId }, cancel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user