Exemple #1
0
        public virtual async Task <IActionResult> SensorsParsePostAsync([FromBody] SensorPayload[] body)
        {
            // Feel free to change any implementation of the code to suit your style.
            // *As long as endpoint locations are not altered*
            var res = new List <SensorPayloadDecoded>();

            foreach (var element in body)
            {
                res.Add(await sensorService.DecodePayload(element));
            }

            return(new ObjectResult(res));
        }