Skip to content

Commit

Permalink
Sort submissions by timestamp (newest first)
Browse files Browse the repository at this point in the history
  • Loading branch information
Defelo committed Sep 27, 2023
1 parent ea709f2 commit 4a3d2d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions challenges/src/endpoints/coding_challenges/submissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ impl Api {
cc.find_related(challenges_coding_challenge_submissions::Entity)
.filter(challenges_coding_challenge_submissions::Column::Creator.eq(auth.0.id))
.find_also_related(challenges_coding_challenge_result::Entity)
.order_by_desc(challenges_coding_challenge_submissions::Column::CreationTimestamp)
.all(&***db)
.await?
.into_iter()
Expand Down

0 comments on commit 4a3d2d3

Please sign in to comment.