Skip to content

Commit

Permalink
only order by scan time
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Dec 5, 2024
1 parent 5a3b2f0 commit 1f52cf9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions vingo/src/routes/scans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ pub async fn recent(state: State<AppState>) -> ResponseResult<Json<Vec<RecentSca
.join(JoinType::InnerJoin, scan::Relation::Card.def())
.join(JoinType::InnerJoin, card::Relation::User.def())
.filter(scan::Column::ScanTime.gt(fourteen_days_ago))
.order_by_asc(card::Column::UserId)
.order_by_asc(Expr::cust(format!(
"DATE({})",
scan::Column::ScanTime.as_str()
)))
.order_by_asc(scan::Column::Id)
.into_model::<RecentScanItem>()
.all(&state.db)
.await
Expand Down

0 comments on commit 1f52cf9

Please sign in to comment.