feat(handlers): Add reply_thread handler for posts
This commit is contained in:
parent
148dfc39c8
commit
cf636077e6
2 changed files with 18 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue