diff --git a/src/library/track.rs b/src/library/track.rs index 0127741..2e580cd 100644 --- a/src/library/track.rs +++ b/src/library/track.rs @@ -198,7 +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 res: Vec<(uuid::Uuid, String, String, chrono::DateTime, Option, Option, Option, chrono::DateTime)> = sqlx::query_as("SELECT DISTINCT(t.*), e.time FROM track t JOIN events e ON t.id = e.track WHERE e.user = $1 ORDER BY e.time DESC") + // todo : weird + let res: Vec<(uuid::Uuid, String, String, chrono::DateTime, Option, Option, Option, chrono::DateTime)> = sqlx::query_as("SELECT DISTINCT(t.*), e.time FROM track t JOIN events e ON t.id = e.track WHERE e.user = $1 ORDER BY e.time DESC LIMIT 300") .bind(&u.username) .fetch_all(get_pg!()) .await