//using FastEndpoints; //using GB5Shared.DTO.Framework.Login; //using GB5Shared.DTO.Framework.ResponseStandard; //using GB5Shared.FastEndPoint; //using TMSBLL.Assessment; //using TMSDAL.DTO.Assessment; //using static GB5Shared.GB5Constant.Constant; //namespace TMSSL.EndPoints.Assessment //{ // public class SubmitAttempt : BaseEndpoint> // { // private readonly IAssessmentBLL _AssessmentBLL; // public SubmitAttempt(IAssessmentBLL assessmentBLL) // { // _AssessmentBLL = assessmentBLL; // } // public override void Configure() // { // Post("/TrainingAssessment/SubmitAttempt"); // AllowAnonymous(); // } // public record SubmitAttemptParameters( // [property: FromBody] SubmitAttemptDTO SubmitAttempt, // [property: FromHeader] string Login // ); // protected override async Task> ExecuteAsync(SubmitAttemptParameters req, LoginDTO loginDTO, CancellationToken ct) // { // try // { // var result = await _AssessmentBLL.SubmitAttempt(req.SubmitAttempt, loginDTO); // return await GB5Shared.ResponseStandard.Response.CreateSuccessResponse(result, CacheKeyLevel.NOT_REQUIRED, loginDTO); // } // catch (Exception ex) // { // return await GB5Shared.ResponseStandard.Response.CreateExceptionError(ex, CacheKeyLevel.NOT_REQUIRED, loginDTO, ex.Message, 500); // } // } // } //}