Esempio n. 1
0
        public async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "machines/{watchId}")] HttpRequest req,
            ILogger log, string watchId)
        {
            List <MachineWithSubscription> machinesWithSubs = _machineService.GetAllMachinesWithSubs(watchId);

            if (machinesWithSubs.Count == 0)
            {
                return(new NoContentResult());
            }

            return(new OkObjectResult(machinesWithSubs));
        }