using EnablementBLL.ShowContentLink; using EnablementDAL.DTO; using EnablementSL.Parameters.ShowContentLink; using FastEndpoints; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; using GB5Shared.FastEndPoint; namespace EnablementSL.Endpoints.ShowContentLink; public class SaveShowContentLink : BaseEndpoint> { private readonly IShowContentLinkBLL _bll; public SaveShowContentLink(IShowContentLinkBLL bll) => _bll = bll; public override void Configure() { Post("/Enablement/SaveShowContentLink"); AllowAnonymous(); } protected override string? GetCacheKey(SaveShowContentLinkParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( SaveShowContentLinkParameters req, LoginDTO login, CancellationToken ct) { var dto = new ShowContentLinkDTO { ShowContentLinkId = req.ShowContentLinkId, ShowId = req.ShowId, StepId = req.StepId, SlNo = req.SlNo, LinkType = req.LinkType, ContentId = req.ContentId, LinkUrl = req.LinkUrl, LinkTitle = req.LinkTitle, DisplayHint = req.DisplayHint, IsActive = req.IsActive, Remarks = req.Remarks, SortOrder = req.SortOrder }; return await _bll.SaveShowContentLinkAsync(dto, login, ct).ConfigureAwait(false); } }