aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/endpoints.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-11 15:30:30 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-11 15:30:30 -0800
commit3733c096fc2ff837ad28ed487ef9cccff4d1e1ed (patch)
treefdde450c2e078612742b2f3e7afd641e8ddab6c0 /rust/src/endpoints.rs
parent011deddfd53abf0eb13fbe292c1a175e1d8fdf7e (diff)
downloadfatcat-3733c096fc2ff837ad28ed487ef9cccff4d1e1ed.tar.gz
fatcat-3733c096fc2ff837ad28ed487ef9cccff4d1e1ed.zip
refactor out OtherBadRequest (just use BadRequest)
Diffstat (limited to 'rust/src/endpoints.rs')
-rw-r--r--rust/src/endpoints.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/rust/src/endpoints.rs b/rust/src/endpoints.rs
index 8ed428a7..77f70ce0 100644
--- a/rust/src/endpoints.rs
+++ b/rust/src/endpoints.rs
@@ -707,7 +707,7 @@ impl Api for Server {
.transaction(|| {
if Some(editor_id.clone()) != editor.editor_id {
return Err(
- FatcatError::OtherBadRequest("editor_id doesn't match".to_string()).into(),
+ FatcatError::BadRequest("editor_id doesn't match".to_string()).into(),
);
}
let auth_context = self.auth_confectionary.require_auth(
@@ -972,10 +972,9 @@ impl Api for Server {
.transaction(|| {
let editgroup_id = FatcatId::from_str(&editgroup_id)?;
if Some(editgroup_id.to_string()) != editgroup.editgroup_id {
- return Err(FatcatError::OtherBadRequest(
- "editgroup_id doesn't match".to_string(),
- )
- .into());
+ return Err(
+ FatcatError::BadRequest("editgroup_id doesn't match".to_string()).into(),
+ );
}
let auth_context = self.auth_confectionary.require_auth(
&conn,