about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--indexer/src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/indexer/src/main.rs b/indexer/src/main.rs
index 4ea81ae..aefcc2b 100644
--- a/indexer/src/main.rs
+++ b/indexer/src/main.rs
@@ -47,6 +47,7 @@ async fn serve_http_endpoint(address: &str, port: u16) -> std::io::Result<()> {
         App::new()
             .wrap(cors)
             .app_data(shared_state.clone())
+            .service(no_search)
             .service(search)
             .service(add_resource)
     })
@@ -96,6 +97,11 @@ async fn add_resource(data: web::Data<AppState>, resource: web::Json<Resource>)
     format!("{:?}", resource)
 }
 
+#[get("/search")]
+async fn no_search(_data: web::Data<AppState>) -> impl Responder {
+    "[]".to_string()
+}
+
 #[get("/search/{term}")]
 async fn search(data: web::Data<AppState>, term: web::Path<String>) -> impl Responder {
     let query: Vec<&str> = term.split(' ').collect();