Exemplo n.º 1
0
        public async Task <IActionResult> GetDistribution([FromRoute] string period, [FromQuery] long vehicleId)
        {
            StatsPeriod periodValue;

            if (!Enum.TryParse(period, true, out periodValue))
            {
                return(NotFound());
            }

            var distribution = await _statsService.GetDistribution(periodValue, vehicleId);

            return(Ok(distribution));
        }