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 UnassignShowChannel : BaseEndpoint> { private readonly IShowChannelBLL _bll; public UnassignShowChannel(IShowChannelBLL bll) => _bll = bll; public override void Configure() { Delete("/Enablement/UnassignShowChannel"); AllowAnonymous(); } protected override string? GetCacheKey(UnassignShowChannelParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( UnassignShowChannelParameters req, LoginDTO login, CancellationToken ct) { var dto = new ShowChannelAssignmentDTO { ShowId = req.ShowId, ChannelId = req.ChannelId }; return await _bll.UnassignChannelFromShowAsync(dto, login, ct).ConfigureAwait(false); } }