public async Task <IActionResult> GetHistorical(int id, [FromQuery] DateTime?StartDate, [FromQuery] DateTime?EndDate, CancellationToken ct = default(CancellationToken))
        {
            try
            {
                var userId = int.Parse(((ClaimsIdentity)User.Identity).Name);
                if (!await _vehicleManager.isValidUserVehicle(userId, id, ct))
                {
                    return(Forbid());
                }

                var vehicle = await _manager.GetHistoricalLocationByVehicleIdAsync(id, StartDate, EndDate, ct);

                if (vehicle == null)
                {
                    return(NotFound());
                }

                return(Ok(vehicle));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, new
                {
                    Code = "ServerError",
                    ex.Message
                }));
            }
        }