feat: update DiscoveryMessage struct and add API documentation
This commit is contained in:
@@ -162,7 +162,7 @@ func (h *Handler) updateExistingDevice(msg DiscoveryMessage, previousStatusID in
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// getDeviceSensors retrieves existing sensors for a device
|
// getDeviceSensors retrieves existing sensors for a device<
|
||||||
func getDeviceSensors(tx *sql.Tx, deviceID string) (map[string]DiscoverySensorPayload, error) {
|
func getDeviceSensors(tx *sql.Tx, deviceID string) (map[string]DiscoverySensorPayload, error) {
|
||||||
rows, err := tx.Query(
|
rows, err := tx.Query(
|
||||||
"SELECT BIN_TO_UUID(id), name, type, data_type_id FROM sensors WHERE device_id = UUID_TO_BIN(?) ORDER BY id",
|
"SELECT BIN_TO_UUID(id), name, type, data_type_id FROM sensors WHERE device_id = UUID_TO_BIN(?) ORDER BY id",
|
||||||
|
|||||||
Reference in New Issue
Block a user