From cdb64ed95275cb0741574f174a81d4183c542bb0 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Mon, 22 Jul 2024 07:25:15 -0700 Subject: [PATCH] Remove old search URLs --- server/src/bin/server.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/server/src/bin/server.rs b/server/src/bin/server.rs index 6faee37..4bce328 100644 --- a/server/src/bin/server.rs +++ b/server/src/bin/server.rs @@ -33,34 +33,6 @@ async fn refresh(nm: &State) -> Result, Debug, -) -> Result, Debug> { - search(nm, "*", None, None).await -} - -#[get("/search/?&")] -async fn search( - nm: &State, - query: &str, - page: Option, - results_per_page: Option, -) -> Result, Debug> { - let page = page.unwrap_or(0); - let results_per_page = results_per_page.unwrap_or(20); - let query = urlencoding::decode(query).map_err(NotmuchError::from)?; - info!(" search '{query}'"); - let res = shared::SearchResult { - summary: nm.search(&query, page * results_per_page, results_per_page)?, - query: query.to_string(), - page, - results_per_page, - total: nm.count(&query)?, - }; - Ok(Json(res)) -} - #[get("/show//pretty")] async fn show_pretty( nm: &State, @@ -237,8 +209,6 @@ async fn main() -> Result<(), Box> { routes![ original, refresh, - search_all, - search, show_pretty, show, graphql_query,