feat: add CRUD endpoints for sensors, actors, and sensor readings; update README and integration tests

This commit is contained in:
2026-01-10 14:28:57 +01:00
parent 81677943c4
commit 52c72b13bb
6 changed files with 653 additions and 1 deletions
+16
View File
@@ -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)