예제 #1
0
        public async Task <IActionResult> GetTrace(string traceId, [FromQuery] bool descending = true)
        {
            if (traceId.IsNullOrEmpty())
            {
                return(BadRequest("traceId cannot be null or empty."));
            }

            var traceLogs = await _traceRepo.GetByTraceId(traceId);

            if (traceId.IsNullOrEmpty())
            {
                return(NoContent());
            }
            else
            {
                return(Ok(CreateMessage(traceLogs, descending)));
            }
        }