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·09+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-15T21·09+0200
commit705097dab91c57524d2311dd839615840044437c (patch)
tree2b7763180fb25d3e85107a086b8fb1739e0e6688 /src/main.rs
parent7a557865528d6dba78b4dcb90248623aa100f930 (diff)
feat(handlers/render): Display edit form for user's own posts
Displays an edit form for posts that are owned by a user (which is
currently defined as "email addresses match").
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 8d81a670e0..55b19b0be7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -181,6 +181,7 @@ fn start_http_server(base_url: String,
             .resource("/thread/submit", |r| r.method(Method::POST).with3(submit_thread))
             .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("/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));