Rename GetDocumentAsync to GetDocumentOfReceiverAsync
Updated the method name in EnvelopeReceiverPageDataService to clarify its purpose of retrieving documents for a receiver. Refactored all references in Razor pages (ReceiverPage.razor, ReceiverSignedPage.razor, EnvelopeReceiverPage.razor) to use the new method name. No changes were made to the method's logic or functionality. This improves code clarity and consistency.
This commit is contained in:
@@ -408,7 +408,7 @@
|
||||
try
|
||||
{
|
||||
// Load PDF bytes via MediatR (uses authenticated user's claims)
|
||||
_pdfBytes = await PageDataService.GetDocumentAsync(_receiverUser);
|
||||
_pdfBytes = await PageDataService.GetDocumentOfReceiverAsync(_receiverUser);
|
||||
if (_pdfBytes is not { Length: > 0 })
|
||||
{
|
||||
_errorMessage = "Dokument konnte nicht geladen werden: Keine Daten empfangen.";
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
var pdfBytes = await PageDataService.GetDocumentAsync(_receiverUser);
|
||||
var pdfBytes = await PageDataService.GetDocumentOfReceiverAsync(_receiverUser);
|
||||
if (pdfBytes is not { Length: > 0 })
|
||||
{
|
||||
_errorMessage = "Dokument konnte nicht geladen werden.";
|
||||
|
||||
@@ -611,7 +611,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
var pdfBytes = await PageDataService.GetDocumentAsync(_receiverUser);
|
||||
var pdfBytes = await PageDataService.GetDocumentOfReceiverAsync(_receiverUser);
|
||||
|
||||
if (pdfBytes is { Length: > 0 })
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EnvelopeReceiverPageDataService(
|
||||
/// <summary>
|
||||
/// Loads the PDF document bytes for the authenticated receiver.
|
||||
/// </summary>
|
||||
public async Task<byte[]?> GetDocumentAsync(ClaimsPrincipal user, CancellationToken cancellationToken = default)
|
||||
public async Task<byte[]?> GetDocumentOfReceiverAsync(ClaimsPrincipal user, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var document = await mediator.Send(new ReadDocumentQuery(EnvelopeId: user.EnvelopeId()), cancellationToken);
|
||||
return document.ByteData;
|
||||
|
||||
Reference in New Issue
Block a user