Benutzerdefinierte Fehlerseiten für die Statuscodes 404 und 500 im HomeController hinzugefügt, um verschiedene Benutzerfälle zu behandeln.

This commit is contained in:
Developer 02
2024-04-26 12:22:09 +02:00
parent 966b7de3c4
commit 6b3c90c618
13 changed files with 137 additions and 51 deletions

View File

@@ -95,5 +95,16 @@ namespace EnvelopeGenerator.Application.Services
return await VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: accessCode);
}
public async Task<IServiceResult<bool>> IsExisting(string envelopeReceiverId)
{
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
if (uuid is null || signature is null)
return Failed(false).WithFlag(EnvelopeFlag.NonDecodableEnvelopeReceiverId);
int count = await _repository.CountAsync(uuid:uuid, signature:signature);
return Successful(count > 0);
}
}
}