From 08550f87e6fcea2af1e11ef834cc296e90af54d9 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 9 Jun 2026 13:32:38 +0200 Subject: [PATCH] Refactor ReceiverSignature to method in CacheController Updated `ReceiverSignature` usage in `CacheController` to reflect its refactoring from a property to a method. This change was applied consistently across the `SaveSignature`, `GetSignature`, and `DeleteSignature` methods, ensuring the `cacheKey` variable now uses `User.ReceiverSignature()` instead of `User.ReceiverSignature`. This refactor likely accommodates additional logic in the `ReceiverSignature` method. --- EnvelopeGenerator.API/Controllers/CacheController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EnvelopeGenerator.API/Controllers/CacheController.cs b/EnvelopeGenerator.API/Controllers/CacheController.cs index 8b15dc46..8379d4eb 100644 --- a/EnvelopeGenerator.API/Controllers/CacheController.cs +++ b/EnvelopeGenerator.API/Controllers/CacheController.cs @@ -31,7 +31,7 @@ public class CacheController( [FromBody] SignatureCacheRequest request, CancellationToken cancel) { - var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature}"; + var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature()}"; var json = JsonSerializer.Serialize(request); var options = cacheOptions.Value.SignatureCacheExpiration.HasValue @@ -50,7 +50,7 @@ public class CacheController( [HttpGet("SignatureCapture/{envelopeKey}")] public async Task GetSignature([FromRoute] string envelopeKey, CancellationToken cancel) { - var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature}"; + var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature()}"; var json = await cache.GetStringAsync(cacheKey, cancel); if (json is null) @@ -67,7 +67,7 @@ public class CacheController( [HttpDelete("SignatureCapture/{envelopeKey}")] public async Task DeleteSignature([FromRoute] string envelopeKey, CancellationToken cancel) { - var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature}"; + var cacheKey = $"{SignatureCacheKeyPrefix}{User.ReceiverSignature()}"; await cache.RemoveAsync(cacheKey, cancel); return Ok();