mirror of
https://github.com/tobiasehlert/teslamateapi.git
synced 2026-02-27 09:54:18 +08:00
fix: filter out updates with NULL end_date or version (#413)
This commit is contained in:
@@ -64,7 +64,7 @@ func TeslaMateAPICarsUpdatesV1(c *gin.Context) {
|
||||
version
|
||||
FROM updates
|
||||
LEFT JOIN cars ON car_id = cars.id
|
||||
WHERE car_id = $1
|
||||
WHERE car_id = $1 AND end_date IS NOT NULL AND version IS NOT NULL
|
||||
ORDER BY start_date DESC
|
||||
LIMIT $2 OFFSET $3;`
|
||||
rows, err := db.Query(query, CarID, ResultShow, ResultPage)
|
||||
|
||||
Reference in New Issue
Block a user