mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 18:02:56 +00:00
Update compute_tools/src/http/api.rs
Co-authored-by: Joonas Koivunen <joonas@neon.tech>
This commit is contained in:
committed by
Vadim Kharitonov
parent
07da78c056
commit
0551410c8a
@@ -143,8 +143,7 @@ async fn handle_configure_request(
|
||||
}
|
||||
|
||||
let body_bytes = hyper::body::to_bytes(req.into_body()).await.unwrap();
|
||||
let spec_raw = str::from_utf8(&body_bytes).unwrap();
|
||||
if let Ok(request) = serde_json::from_str::<ConfigurationRequest>(spec_raw) {
|
||||
if let Ok(request) = serde_json::from_slice::<ConfigurationRequest>(body_bytes) {
|
||||
let spec = request.spec;
|
||||
|
||||
let parsed_spec = match ParsedSpec::try_from(spec) {
|
||||
|
||||
Reference in New Issue
Block a user