about summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-15T21·30+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-15T21·30+0200
commit56d57edfd0df66978ff069651fc4c21dee856b0a (patch)
tree0f0601aa71d1670d2a25b7e206a926b47af558ec /src/main.rs
parente130e15b79c0a77c7759ec24e44310eebc013417 (diff)
feat(handlers): Implement post editing handler
Implements a handler that receives the edit form result and updates
the database accordingly if the user identity matches.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 55b19b0be7c7..30b371eaede5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -182,6 +182,7 @@ fn start_http_server(base_url: String,
             .resource("/thread/reply", |r| r.method(Method::POST).with3(reply_thread))
             .resource("/thread/{id}", |r| r.method(Method::GET).with3(forum_thread))
             .resource("/post/{id}/edit", |r| r.method(Method::GET).with3(edit_form))
+            .resource("/post/edit", |r| r.method(Method::POST).with3(edit_post))
             .resource("/search", |r| r.method(Method::GET).with2(search_forum))
             .resource("/oidc/login", |r| r.method(Method::GET).with(login))
             .resource("/oidc/callback", |r| r.method(Method::POST).with3(callback));