From 8d352838e8788233a1781c70edd14dca1ed23434 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Mon, 7 Oct 2024 20:15:37 +0200 Subject: [PATCH] fix --- src/library/track.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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!())