aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/admin/mod.rs')
-rw-r--r--src/api/admin/mod.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/api/admin/mod.rs b/src/api/admin/mod.rs
index 73700e6e..c4857c10 100644
--- a/src/api/admin/mod.rs
+++ b/src/api/admin/mod.rs
@@ -5,14 +5,3 @@ mod router;
mod bucket;
mod cluster;
mod key;
-
-use hyper::{Body, Request};
-use serde::Deserialize;
-
-use error::*;
-
-pub async fn parse_json_body<T: for<'de> Deserialize<'de>>(req: Request<Body>) -> Result<T, Error> {
- let body = hyper::body::to_bytes(req.into_body()).await?;
- let resp: T = serde_json::from_slice(&body).ok_or_bad_request("Invalid JSON")?;
- Ok(resp)
-}