Skip to content

Commit

Permalink
feat: default proposals sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Nov 21, 2024
1 parent 80064f7 commit ff082fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webserver/src/repository/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl GovernanceRepoTrait for GovernanceRepo {
conn.interact(move |conn| {
query
.select(GovernanceProposalDb::as_select())
.order(governance_proposals::dsl::id.desc())
.paginate(page)
.load_and_count_pages(conn)
})
Expand All @@ -98,7 +99,10 @@ impl GovernanceRepoTrait for GovernanceRepo {
let query = self.governance_proposals(status, kind, pattern);

conn.interact(move |conn| {
query.select(GovernanceProposalDb::as_select()).load(conn)
query
.select(GovernanceProposalDb::as_select())
.order(governance_proposals::dsl::id.desc())
.load(conn)
})
.await
.map_err(|e| e.to_string())?
Expand Down

0 comments on commit ff082fb

Please sign in to comment.