using EnablementBLL.ShowRun; using EnablementDAL.DTO; using EnablementSL.Parameters.ShowRun; using FastEndpoints; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; using GB5Shared.FastEndPoint; namespace EnablementSL.Endpoints.ShowRun; public class CreateShowRun : BaseEndpoint> { private readonly IShowRunBLL _bll; public CreateShowRun(IShowRunBLL bll) => _bll = bll; public override void Configure() { Post("/Enablement/CreateShowRun"); AllowAnonymous(); } protected override string? GetCacheKey(CreateShowRunParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( CreateShowRunParameters req, LoginDTO login, CancellationToken ct) { var dto = new ShowRunDTO { ShowId = req.ShowId, RequestId = req.RequestId, StartedBy = req.StartedBy, TriggerSnapshot = req.TriggerSnapshot }; return await _bll.CreateRunAsync(dto, login, ct).ConfigureAwait(false); } }