package routes import ( "basic-sensor-receiver/app" "net/http" "github.com/gin-gonic/gin" ) func GetSensors(s *app.Server) gin.HandlerFunc { return func(c *gin.Context) { sensors, err := s.Services.Sensors.GetList() if err != nil { c.AbortWithError(500, err) return } c.JSON(http.StatusOK, sensors) } }