refactor(HomeController): Aktualisiert, um den Envelope-Empfänger als Modell zur EnvelopeLocked-Ansicht hinzuzufügen

This commit is contained in:
Developer 02
2024-11-28 21:50:05 +01:00
parent b4a97abe6b
commit 0469f057c9
2 changed files with 13 additions and 6 deletions

View File

@@ -18,7 +18,6 @@ using static EnvelopeGenerator.Common.Constants;
using Ganss.Xss;
using Newtonsoft.Json;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Web.Controllers
{
@@ -134,9 +133,9 @@ namespace EnvelopeGenerator.Web.Controllers
{
ViewData["UserCulture"] = _cultures[UserLanguage];
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
Success: isExisting => isExisting ? View().WithData("EnvelopeKey", envelopeReceiverId) : this.ViewEnvelopeNotFound(),
Fail: IActionResult (messages,notices) =>
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync(
Success: er => View(er).WithData("EnvelopeKey", envelopeReceiverId),
Fail: IActionResult (messages, notices) =>
{
_logger.LogNotice(notices);
Response.StatusCode = StatusCodes.Status401Unauthorized;