Clean-up and more consistent styles.

This commit is contained in:
Matthew Crossman 2021-01-30 19:33:38 +11:00
parent c71df35b22
commit 11e4ff42ed
No known key found for this signature in database
GPG key ID: C6B942B019794CC2
6 changed files with 32 additions and 18 deletions

View file

@ -100,8 +100,7 @@ async fn main() -> std::io::Result<()> {
.route("/", web::get().to(subreddit::page))
.route("/{sort:hot|new|top|rising|controversial}/", web::get().to(subreddit::page))
// Handle subscribe/unsubscribe
.route("/{action:subscribe|unsubscribe}/", web::post().to(subreddit::set))
//.route("/unsubscribe/", web::post().to(subreddit::unsubscribe))
.route("/{action:subscribe|unsubscribe}/", web::post().to(subreddit::subscriptions))
// View post on subreddit
.service(
web::scope("/comments/{id}/{title}")