diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-26 17:08:21 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-26 17:08:21 -0700 |
commit | 55f8a495354d233f7a68128b2f3c21dbe7395427 (patch) | |
tree | e3afd04a58cc74abd9e15557d27d19ce47256f98 /rust/fatcat-api/src/server.rs | |
parent | 82f8b4d838de3fb8eda5db9b23c5bc48ab281f9e (diff) | |
download | fatcat-55f8a495354d233f7a68128b2f3c21dbe7395427.tar.gz fatcat-55f8a495354d233f7a68128b2f3c21dbe7395427.zip |
tweak schema (api and sql)
Diffstat (limited to 'rust/fatcat-api/src/server.rs')
-rw-r--r-- | rust/fatcat-api/src/server.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/fatcat-api/src/server.rs b/rust/fatcat-api/src/server.rs index 95829602..ed012478 100644 --- a/rust/fatcat-api/src/server.rs +++ b/rust/fatcat-api/src/server.rs @@ -190,15 +190,15 @@ where // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = req.get::<UrlEncodedQuery>().unwrap_or_default(); - let param_issn = query_params - .get("issn") - .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter issn".to_string())))? + let param_issnl = query_params + .get("issnl") + .ok_or_else(|| Response::with((status::BadRequest, "Missing required query parameter issnl".to_string())))? .first() - .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter issn was empty".to_string())))? + .ok_or_else(|| Response::with((status::BadRequest, "Required query parameter issnl was empty".to_string())))? .parse::<String>() - .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter issn - doesn't match schema: {}", e))))?; + .map_err(|e| Response::with((status::BadRequest, format!("Couldn't parse query parameter issnl - doesn't match schema: {}", e))))?; - match api.container_lookup_get(param_issn, context).wait() { + match api.container_lookup_get(param_issnl, context).wait() { Ok(rsp) => match rsp { ContainerLookupGetResponse::FoundEntity(body) => { let body_string = serde_json::to_string(&body).expect("impossible to fail to serialize"); |