about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/models.rs8
-rw-r--r--src/render.rs2
-rw-r--r--src/schema.rs8
3 files changed, 13 insertions, 5 deletions
diff --git a/src/models.rs b/src/models.rs
index 159a85469a..9d3405e154 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -24,6 +24,7 @@ pub struct Thread {
     pub posted: DateTime<Utc>,
     pub author_name: String,
     pub author_email: String,
+    pub sticky: bool,
 }
 
 /// This struct is used as the query type for the thread index view,
@@ -33,9 +34,12 @@ pub struct Thread {
 pub struct ThreadIndex {
     pub thread_id: i32,
     pub title: String,
-    pub author_name: String,
-    pub posted: DateTime<Utc>,
+    pub thread_author: String,
+    pub created: DateTime<Utc>,
+    pub sticky: bool,
     pub post_id: i32,
+    pub post_author: String,
+    pub posted: DateTime<Utc>,
 }
 
 #[derive(Identifiable, Queryable, Serialize, Associations)]
diff --git a/src/render.rs b/src/render.rs
index 66b3fe19c8..598d48bce8 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -72,7 +72,7 @@ impl Handler<IndexPage> for Renderer {
                 id: thread.thread_id,
                 title: escape_html(&thread.title),
                 posted: thread.posted.into(),
-                author_name: thread.author_name,
+                author_name: thread.thread_author,
             })
             .collect();
 
diff --git a/src/schema.rs b/src/schema.rs
index 02392c8fc6..50a55c7868 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -16,6 +16,7 @@ table! {
         posted -> Timestamptz,
         author_name -> Varchar,
         author_email -> Varchar,
+        sticky -> Bool,
     }
 }
 
@@ -24,9 +25,12 @@ table! {
     thread_index (thread_id){
         thread_id -> Integer,
         title -> Text,
-        author_name -> Text,
-        posted -> Timestamptz,
+        thread_author -> Text,
+        created -> Timestamptz,
+        sticky -> Bool,
         post_id -> Integer,
+        post_author -> Text,
+        posted -> Timestamptz,
     }
 }