diff --git a/src/library/track.rs b/src/library/track.rs index 2e51627..ab7aac6 100644 --- a/src/library/track.rs +++ b/src/library/track.rs @@ -198,8 +198,8 @@ impl Track { /// /// A vector of `Track` objects representing the latest tracks for the given user. pub async fn get_latest_of_user(u: &User) -> Vec { - let ids: Vec<(uuid::Uuid,)> = sqlx::query_as( - "SELECT DISTINCT(track) FROM events WHERE \"user\" = $1 ORDER BY time DESC LIMIT 300", + let ids: Vec<(uuid::Uuid, chrono::DateTime)> = sqlx::query_as( + "SELECT DISTINCT(track), time FROM events WHERE \"user\" = $1 ORDER BY time DESC LIMIT 300", ) .bind(&u.username) .fetch_all(get_pg!())