using EnablementBLL.Show; using EnablementSL.Parameters.Show; using FastEndpoints; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; using GB5Shared.FastEndPoint; namespace EnablementSL.Endpoints.Show; public class GetSelectListShow : BaseEndpoint> { private readonly IShowBLL _bll; public GetSelectListShow(IShowBLL bll) => _bll = bll; public override void Configure() { Post("/Enablement/GetSelectListShow"); AllowAnonymous(); } protected override string? GetCacheKey(GetSelectListShowParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( GetSelectListShowParameters req, LoginDTO login, CancellationToken ct) { try { var result = await _bll.GetSelectListShow(req.CriteriaDTO, login).ConfigureAwait(false); return await GB5Shared.ResponseStandard.Response.CreateSuccessResponse( result, GB5Shared.GB5Constant.Constant.CacheKeyLevel.NOT_REQUIRED, login); } catch (Exception ex) { return await GB5Shared.ResponseStandard.Response.CreateExceptionError( ex, GB5Shared.GB5Constant.Constant.CacheKeyLevel.NOT_REQUIRED, login, ex.Message, 500); } } }