feat: add CRUD endpoints for sensors, actors, and sensor readings; update README and integration tests
This commit is contained in:
@@ -124,7 +124,23 @@ func main() {
|
||||
auth.GET("/protected", h.Protected)
|
||||
auth.GET("/mqttping", h.MQTTPing)
|
||||
auth.GET("/messages", handler.GetMessages)
|
||||
auth.GET("/sensors", h.GetSensors)
|
||||
auth.GET("/sensors/:id", h.GetSensor)
|
||||
auth.POST("/sensors", h.CreateSensor)
|
||||
auth.PUT("/sensors/:id", h.UpdateSensor)
|
||||
auth.DELETE("/sensors/:id", h.DeleteSensor)
|
||||
|
||||
auth.GET("/actors", h.GetActors)
|
||||
auth.GET("/actors/:id", h.GetActor)
|
||||
auth.POST("/actors", h.CreateActor)
|
||||
auth.PUT("/actors/:id", h.UpdateActor)
|
||||
auth.DELETE("/actors/:id", h.DeleteActor)
|
||||
|
||||
auth.GET("/sensor-readings", h.GetSensorReadings)
|
||||
auth.GET("/sensor-readings/:id", h.GetSensorReading)
|
||||
auth.POST("/sensor-readings", h.CreateSensorReading)
|
||||
auth.PUT("/sensor-readings/:id", h.UpdateSensorReading)
|
||||
auth.DELETE("/sensor-readings/:id", h.DeleteSensorReading)
|
||||
|
||||
// Device CRUD routes
|
||||
auth.POST("/devices", h.CreateDevice)
|
||||
|
||||
Reference in New Issue
Block a user