Ejemplo n.º 1
0
        public async Task <IActionResult> History()
        {
            try
            {
                log.Info($"new history request({User.Identity.Name})");
                var result = await _busService.GetGeoLineHistories(new GetGeoLineHistory { UserId = User.Identity.Name });

                var histories = result.GeoLines.Select(c => new
                {
                    c.FromLong,
                    c.FromLat,
                    c.ToLong,
                    c.ToLat,
                    c.Distance
                }).ToList();

                return(Ok(histories));
            }
            catch (System.Exception ex)
            {
                log.Error(ex.Message, ex);
                throw;
            }
        }