Beispiel #1
0
        public ActionResult <List <Consumption> > Get(DateTime initial_date, DateTime end_date)
        {
            string loggedUser = User.FindFirstValue("userId");

            if (loggedUser == null)
            {
                return(Unauthorized());
            }

            List <Consumption> consumptions = consumptionService.GetConsumptionsPeriod(initial_date, end_date);

            return(consumptions);
        }