diff options
Diffstat (limited to 'src/db.rs')
-rw-r--r-- | src/db.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/db.rs b/src/db.rs index c26597293706..5a66fbb0fc74 100644 --- a/src/db.rs +++ b/src/db.rs @@ -36,19 +36,18 @@ impl Actor for DbExecutor { pub struct ListThreads; impl Message for ListThreads { - type Result = Result<Vec<Thread>>; + type Result = Result<Vec<ThreadIndex>>; } impl Handler<ListThreads> for DbExecutor { type Result = <ListThreads as Message>::Result; fn handle(&mut self, _: ListThreads, _: &mut Self::Context) -> Self::Result { - use schema::threads::dsl::*; + use schema::thread_index::dsl::*; let conn = self.0.get()?; - let results = threads - .order(posted.desc()) - .load::<Thread>(&conn)?; + let results = thread_index + .load::<ThreadIndex>(&conn)?; Ok(results) } } |