about summary refs log tree commit diff
path: root/src/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index c97e677311a0..c866f7a1403c 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -105,12 +105,16 @@ pub fn submit_thread(state: State<AppState>,
 
     let new_thread = NewThread {
         title: input.0.title,
-        body: input.0.body,
         author_name: author.name,
         author_email: author.email,
     };
 
-    state.db.send(CreateThread(new_thread))
+    let msg = CreateThread {
+        new_thread,
+        body: input.0.body,
+    };
+
+    state.db.send(msg)
         .from_err()
         .and_then(move |res| {
             let thread = res?;