Skip to content

Commit

Permalink
Fix issue with missing benchmarks
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser committed Oct 18, 2021
1 parent bc89626 commit fa63ae3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ async fn run(
(&Method::GET, "/bench") => {
// FIXME: this is terrible
let connection = establish_connection();
let res: Vec<Benchmark> = benchmarks.limit(100).load(&connection)?;
let mut res: Vec<Benchmark> = benchmarks
.order(created_at.desc())
.limit(100)
.load(&connection)?;
res.reverse();
let res = serde_json::to_string(&res)?;
Response::builder()
.status(StatusCode::OK)
Expand Down

0 comments on commit fa63ae3

Please sign in to comment.