Fix: SQL Query scan device

This commit is contained in:
Siegfried Siegert 2020-09-20 17:44:47 +02:00
parent 6f319cf6dd
commit 5045802242

View File

@ -24,7 +24,7 @@ func (db *DB) AllDevices() ([]*Device, error) {
devices := make([]*Device, 0)
for rows.Next() {
device := new(Device)
err := rows.Scan(&device.TOPIC, device.CustomerID, device.DeviceID, device.ProjectName, &device.MAC, &device.SN, &device.LastMsg)
err := rows.Scan(&device.TOPIC, &device.CustomerID, &device.DeviceID, &device.ProjectName, &device.MAC, &device.SN, &device.LastMsg)
if err != nil {
return nil, err
}