Ejemplo n.º 1
0
        public async Task <IActionResult> GetThing(int thingId)
        {
            try
            {
                var alarmCurrent = await _alarmService.GetAlarmPerThingId(thingId);

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

                return(Ok(alarmCurrent));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex.Message));
            }
        }