using EnablementBLL.ShowChannel; using EnablementDAL.DTO; using EnablementSL.Parameters.ShowChannel; using FastEndpoints; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; using GB5Shared.FastEndPoint; namespace EnablementSL.Endpoints.ShowChannel; public class AssignShowChannel : BaseEndpoint> { private readonly IShowChannelBLL _bll; public AssignShowChannel(IShowChannelBLL bll) => _bll = bll; public override void Configure() { Post("/Enablement/AssignShowChannel"); AllowAnonymous(); } protected override string? GetCacheKey(AssignShowChannelParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( AssignShowChannelParameters req, LoginDTO login, CancellationToken ct) { var dto = new ShowChannelAssignmentDTO { ShowId = req.ShowId, ChannelId = req.ChannelId }; return await _bll.AssignChannelToShowAsync(dto, login, ct).ConfigureAwait(false); } }