Skip to content

Commit 994b539

Browse files
committed
include rank in the default sort spec
1 parent 5639886 commit 994b539

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

fly-app/src/main.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,8 @@ async fn get_wasms(
269269
if !sort_stmt.is_empty() {
270270
statement.push_str(&sort_stmt);
271271
statement.push_str(", ");
272-
} else {
273-
statement.push_str("rank DESC, ");
274272
}
275-
statement.push_str("ledger_sequence, id ASC\n");
276-
273+
statement.push_str("rank DESC, ledger_sequence, id ASC\n");
277274
statement.push_str("LIMIT $3");
278275

279276
let rows = sqlx::query_as::<_, WasmResult>(&statement)
@@ -563,11 +560,8 @@ async fn get_contracts_root(
563560
if !sort_stmt.is_empty() {
564561
statement.push_str(&sort_stmt);
565562
statement.push_str(", ");
566-
} else {
567-
statement.push_str("rank DESC, ");
568563
}
569-
statement.push_str("ledger_sequence, id ASC\n");
570-
564+
statement.push_str("rank DESC, ledger_sequence, id ASC\n");
571565
statement.push_str("LIMIT $3");
572566

573567
let rows = sqlx::query_as::<_, ContractResult>(&statement)

0 commit comments

Comments
 (0)