fix(db): Order index threads in descending post time

Technically the last post date should matter more here, but we'll get
there.
This commit is contained in:
Vincent Ambo 2018-04-09 23:41:21 +02:00
parent 103a59485f
commit c5833c02e2

View file

@ -30,7 +30,9 @@ impl Handler<ListThreads> for DbExecutor {
use schema::threads::dsl::*; use schema::threads::dsl::*;
let conn = self.0.get()?; let conn = self.0.get()?;
let results = threads.load::<Thread>(&conn)?; let results = threads
.order(posted.desc())
.load::<Thread>(&conn)?;
Ok(results) Ok(results)
} }
} }