mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
fix: check if rows encountered an error in GetAllColors()
This commit is contained in:
@@ -86,6 +86,11 @@ func GetAllColors() ([]models.LampState, error) {
|
|||||||
}
|
}
|
||||||
controllers = append(controllers, state)
|
controllers = append(controllers, state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := rows.Err(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return controllers, nil
|
return controllers, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user