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 UpdateShowRunStep : BaseEndpoint> { private readonly IShowRunBLL _bll; public UpdateShowRunStep(IShowRunBLL bll) => _bll = bll; public override void Configure() { Post("/Enablement/UpdateShowRunStep"); AllowAnonymous(); } protected override string? GetCacheKey(UpdateShowRunStepParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( UpdateShowRunStepParameters req, LoginDTO login, CancellationToken ct) { var stepDto = new ShowRunStepDTO { ShowRunId = req.ShowRunId, ShowStepId = req.StepId, StepState = req.StepState, ActionTaken = req.ActionTaken, ActionPayload = req.ActionPayload, TimeSpentOnMs = req.TimeSpentMs }; return await _bll.UpdateStepAsync(stepDto, login, ct).ConfigureAwait(false); } }