From 842d97e9fa10a668278036bf0fc7f3f1b6e18c4e Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Wed, 13 Jan 2021 21:02:48 -0800 Subject: [PATCH] Fix short post IDs --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9d078d7..474ab9f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,8 +59,6 @@ async fn main() -> std::io::Result<()> { .route("/proxy/{url:.*}/", web::get().to(proxy::handler)) // Browse user profile .route("/{scope:u|user}/{username}/", web::get().to(user::profile)) - // Short link for post - .route("/{id:.{5,6}}/", web::get().to(post::item)) // Configure settings .service(web::resource("/settings/").route(web::get().to(settings::get)).route(web::post().to(settings::set))) // Subreddit services @@ -99,6 +97,8 @@ async fn main() -> std::io::Result<()> { // Search all of Reddit .route("/search/", web::get().to(search::find)), ) + // Short link for post + .route("/{id:.{5,6}}/", web::get().to(post::item)) }) .bind(&address) .unwrap_or_else(|e| panic!("Cannot bind to the address {}: {}", address, e))