Fix: SQL Query scan device
This commit is contained in:
parent
6f319cf6dd
commit
5045802242
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user