fix: check if rows encountered an error in GetAllColors()

This commit is contained in:
Kaaninchen
2026-08-03 17:25:05 +02:00
parent a13c1facf9
commit 67162359ed
+5
View File
@@ -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
} }