fix
This commit is contained in:
parent
39e2897f0b
commit
8d352838e8
1 changed files with 2 additions and 2 deletions
|
@ -198,8 +198,8 @@ impl Track {
|
||||||
///
|
///
|
||||||
/// A vector of `Track` objects representing the latest tracks for the given user.
|
/// A vector of `Track` objects representing the latest tracks for the given user.
|
||||||
pub async fn get_latest_of_user(u: &User) -> Vec<Self> {
|
pub async fn get_latest_of_user(u: &User) -> Vec<Self> {
|
||||||
let ids: Vec<(uuid::Uuid,)> = sqlx::query_as(
|
let ids: Vec<(uuid::Uuid, chrono::DateTime<chrono::Utc>)> = sqlx::query_as(
|
||||||
"SELECT DISTINCT(track) FROM events WHERE \"user\" = $1 ORDER BY time DESC LIMIT 300",
|
"SELECT DISTINCT(track), time FROM events WHERE \"user\" = $1 ORDER BY time DESC LIMIT 300",
|
||||||
)
|
)
|
||||||
.bind(&u.username)
|
.bind(&u.username)
|
||||||
.fetch_all(get_pg!())
|
.fetch_all(get_pg!())
|
||||||
|
|
Loading…
Reference in a new issue