Refactor command records and simplify document handling
- Updated `ReceiverGetOrCreateCommand` to include a required `IEnumerable<Signature>`. - Modified `DocumentCreateCommand` to remove `DataAsByte` and enforce a required `DataAsBase64` property with immutability. - Cleaned up SQL command formatting in `EnvelopeReceiverAddReadSQL`. - Simplified document validation logic in `EnvelopeReceiverController` by removing redundant checks. - Changed hardcoded connection string to a variable `_cnnStr` for improved security and flexibility.
This commit is contained in:
@@ -36,14 +36,12 @@ public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signa
|
||||
/// <summary>
|
||||
/// DTO zum Erstellen eines Dokuments.
|
||||
/// </summary>
|
||||
/// <param name="DataAsByte">
|
||||
/// Die Dokumentdaten im Byte-Array-Format. Wird verwendet, wenn das Dokument als Roh-Binärdaten bereitgestellt wird.
|
||||
/// </param>
|
||||
public record DocumentCreateCommand(byte[]? DataAsByte = null)
|
||||
public record DocumentCreateCommand()
|
||||
{
|
||||
/// <summary>
|
||||
/// Die Dokumentdaten im Base64-String-Format. Wird verwendet, wenn das Dokument als Base64-codierter String bereitgestellt wird.
|
||||
/// </summary>
|
||||
public string? DataAsBase64 { get; set; }
|
||||
[Required]
|
||||
public required string DataAsBase64 { get; init; }
|
||||
};
|
||||
#endregion
|
||||
Reference in New Issue
Block a user