Esempio n. 1
0
        public async Task <ActionResult <TimelineResponse> > GetTimeline(TimelineRequest request)
        {
            Stopwatch sw = new Stopwatch();

            sw.Start();
            TimelineResponse response;

            if (request.Filter == null || request.Filter.isDefault)
            {
                response = await TimelineService.GetTimelineFromTimeResults(context, request);
            }
            else
            {
                response = await TimelineService.GetTimeline(context, request);
            }
            sw.Stop();
            logger.LogInformation($"Get Timeline in {sw.ElapsedMilliseconds} ms");
            return(response);
        }