about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/handlers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index dd1a5007c0bd..33f33deccb87 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -165,9 +165,9 @@ pub fn reply_thread(state: State<AppState>,
     };
 
     state.db.send(CreatePost(new_post))
+        .flatten()
         .from_err()
-        .and_then(move |res| {
-            let post = res?;
+        .and_then(move |post| {
             info!("Posted reply {} to thread {}", post.id, post.thread_id);
             Ok(HttpResponse::SeeOther()
                .header("Location", format!("/thread/{}#post-{}", post.thread_id, post.id))