feat(ReadOnlyController): envelope-id von create DTO automatisch aus envelope-id claim hinzugefügt.

This commit is contained in:
Developer 02
2024-10-09 01:16:06 +02:00
parent da28a7332b
commit c1d8f817bb
2 changed files with 9 additions and 1 deletions

View File

@@ -46,7 +46,15 @@ namespace EnvelopeGenerator.Web.Controllers
return Unauthorized();
}
var envelopeId = this.GetAuthEnvelopeId();
if (envelopeId is null)
{
_logger.LogError("Envelope Id clam is not found in envelope-receiver-read-only creation process. Create DTO is:\n {dto}", JsonConvert.SerializeObject(createDto));
return Unauthorized();
}
createDto.AddedWho = authReceiverMail;
createDto.EnvelopeId = envelopeId;
// create entity
var creation_res = await _erroService.CreateAsync(createDto: createDto);