From d1cdc03a65c73ca4f6b41d9b7c3a56c9b68bf62b Mon Sep 17 00:00:00 2001 From: Minoru Osuka Date: Sat, 7 Nov 2020 22:23:25 +0900 Subject: [PATCH] Fixed a bug that did not return schema --- bayard-rest/src/rest/handler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bayard-rest/src/rest/handler.rs b/bayard-rest/src/rest/handler.rs index 15d3383..fdeb13c 100644 --- a/bayard-rest/src/rest/handler.rs +++ b/bayard-rest/src/rest/handler.rs @@ -133,8 +133,8 @@ pub async fn merge(state: AppState) -> Result { #[get("/v1/schema")] pub async fn schema(state: AppState) -> Result { match state.index_client.lock().unwrap().schema() { - Ok(_) => { - let res = HttpResponse::Ok().await.unwrap(); + Ok(s) => { + let res = HttpResponse::Ok().body(s); Ok(res) } Err(e) => {