aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/k2v/index.rs')
-rw-r--r--src/api/k2v/index.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/api/k2v/index.rs b/src/api/k2v/index.rs
index e8cd1fba..291464ab 100644
--- a/src/api/k2v/index.rs
+++ b/src/api/k2v/index.rs
@@ -1,6 +1,6 @@
use std::sync::Arc;
-use hyper::{Body, Response};
+use hyper::Response;
use serde::Serialize;
use garage_util::data::*;
@@ -11,6 +11,7 @@ use garage_model::garage::Garage;
use garage_model::k2v::item_table::{BYTES, CONFLICTS, ENTRIES, VALUES};
use crate::helpers::*;
+use crate::k2v::api_server::ResBody;
use crate::k2v::error::*;
use crate::k2v::range::read_range;
@@ -22,7 +23,7 @@ pub async fn handle_read_index(
end: Option<String>,
limit: Option<u64>,
reverse: Option<bool>,
-) -> Result<Response<Body>, Error> {
+) -> Result<Response<ResBody>, Error> {
let reverse = reverse.unwrap_or(false);
let node_id_vec = garage
@@ -71,7 +72,7 @@ pub async fn handle_read_index(
next_start,
};
- Ok(json_ok_response(&resp)?)
+ json_ok_response::<Error, _>(&resp)
}
#[derive(Serialize)]