about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-08T18·20+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-08T18·20+0200
commitcf636077e65ae4c8598fd32aa9b233b87070875e (patch)
tree3f149480deed7d04af0cf5f5f70090d5495a056e /src/main.rs
parent148dfc39c80266e9c3077737e4258739dba7d86a (diff)
feat(handlers): Add reply_thread handler for posts
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index ad1f81927d32..3269e2d4dc3c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -61,7 +61,8 @@ fn main() {
         App::with_state(AppState { db: db_addr.clone(), tera })
             .middleware(middleware::Logger::default())
             .resource("/", |r| r.method(Method::GET).with(forum_index))
-            .resource("/thread", |r| r.method(Method::POST).with2(submit_thread))
+            .resource("/thread/submit", |r| r.method(Method::POST).with2(submit_thread))
+            .resource("/thread/reply", |r| r.method(Method::POST).with2(reply_thread))
             .resource("/thread/{id}", |r| r.method(Method::GET).with2(forum_thread))})
         .bind(&bind_host).expect(&format!("Could not bind on '{}'", bind_host))
         .start();