summaryrefslogtreecommitdiffstats
path: root/rust/src/editing.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-22 21:41:35 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-22 21:50:29 -0800
commit09475b87821142c5cd36c6b90fb97deb2a058312 (patch)
tree2f57b9623a8f8938e8d13b4441e8861b19e6e533 /rust/src/editing.rs
parent83d5c49f5093b1820b625e1b3a1e21fc7242f79e (diff)
downloadfatcat-09475b87821142c5cd36c6b90fb97deb2a058312.tar.gz
fatcat-09475b87821142c5cd36c6b90fb97deb2a058312.zip
allow passing description+extra to batch endpoints
Pretty messy, but I needed some way to do this. In particular, requires json.dumps() in python code, for now. Blech.
Diffstat (limited to 'rust/src/editing.rs')
-rw-r--r--rust/src/editing.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/src/editing.rs b/rust/src/editing.rs
index e181e8a7..c17e5964 100644
--- a/rust/src/editing.rs
+++ b/rust/src/editing.rs
@@ -42,6 +42,8 @@ pub fn make_edit_context(
editor_id: FatcatId,
editgroup_id: Option<FatcatId>,
autoaccept: bool,
+ description: Option<String>,
+ extra: Option<serde_json::Value>,
) -> Result<EditContext> {
// *either* autoaccept is false and editgroup_id is Some, *or* autoaccept is true and
// editgroup_id is None
@@ -54,8 +56,8 @@ pub fn make_edit_context(
editor: None,
changelog_index: None,
submitted: None,
- description: None,
- extra: None,
+ description: description,
+ extra: extra,
annotations: None,
edits: None,
};