Aktualisiert, um EnvelopeReceiverDto anstelle von EnvelopeResponse zu verwenden

This commit is contained in:
Developer 02
2024-05-08 12:10:24 +02:00
parent d8617093ce
commit 357866ea44
8 changed files with 21 additions and 39 deletions

View File

@@ -14,11 +14,7 @@ using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Application.DTOs;
using Microsoft.AspNetCore.Localization;
using Newtonsoft.Json.Linq;
using Microsoft.Extensions.Configuration;
using Ganss.Xss;
using System.Text.Encodings.Web;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Web.Controllers
{
@@ -54,9 +50,7 @@ namespace EnvelopeGenerator.Web.Controllers
{
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
bool accessCodeAlreadyRequested = database.Models.receiverModel.AccessCodeAlreadyRequested(response.Receiver.Email, response.Envelope.Id);
accessCodeAlreadyRequested = await _historyService.AccessCodeAlreadyRequested(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress);
bool accessCodeAlreadyRequested = await _historyService.AccessCodeAlreadyRequested(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress);
if (!accessCodeAlreadyRequested)
{
// Send email with password
@@ -113,7 +107,7 @@ namespace EnvelopeGenerator.Web.Controllers
if(uuid is null || signature is null)
{
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[MessageKey.WrongEnvelopeReceiverId.ToString()]);
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[MessageKey.WrongEnvelopeReceiverId]);
return BadRequest(_localizer[MessageKey.WrongEnvelopeReceiverId]);
}