Refactor SignatureService to DocReceiverElementService
Renamed the `SignatureService` class to `DocReceiverElementService` to reflect its updated purpose. Updated the `GetAsync` method to use the `DocReceiverElement` API endpoint (`/api/DocReceiverElement/{envelopeKey}`) instead of the `Signature` API endpoint. These changes align the service with the new `DocReceiverElement` context.
This commit is contained in:
@@ -6,13 +6,13 @@ using Microsoft.Extensions.Options;
|
|||||||
|
|
||||||
namespace EnvelopeGenerator.ReceiverUI.Services;
|
namespace EnvelopeGenerator.ReceiverUI.Services;
|
||||||
|
|
||||||
public class SignatureService(HttpClient http, IOptions<ApiOptions> apiOptions)
|
public class DocReceiverElementService(HttpClient http, IOptions<ApiOptions> apiOptions)
|
||||||
{
|
{
|
||||||
private static readonly JsonSerializerOptions _jsonOptions = new(JsonSerializerDefaults.Web);
|
private static readonly JsonSerializerOptions _jsonOptions = new(JsonSerializerDefaults.Web);
|
||||||
|
|
||||||
public async Task<IReadOnlyList<SignatureDto>> GetAsync(string envelopeKey, CancellationToken cancel = default)
|
public async Task<IReadOnlyList<SignatureDto>> GetAsync(string envelopeKey, CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
var url = $"{apiOptions.Value.BaseUrl}/api/Signature/{Uri.EscapeDataString(envelopeKey)}";
|
var url = $"{apiOptions.Value.BaseUrl}/api/DocReceiverElement/{Uri.EscapeDataString(envelopeKey)}";
|
||||||
var response = await http.GetAsync(url, cancel);
|
var response = await http.GetAsync(url, cancel);
|
||||||
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
Reference in New Issue
Block a user