aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/api_server.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-24 22:23:53 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-24 22:23:53 -0700
commit580b579a3854ab070ac48680464a4413f552749c (patch)
tree47abdb9b1cccb4239cdb758259cc3e679a569c15 /rust/src/api_server.rs
parent01a6c95f4efe357907681edc6ac6bd347017cf74 (diff)
downloadfatcat-580b579a3854ab070ac48680464a4413f552749c.tar.gz
fatcat-580b579a3854ab070ac48680464a4413f552749c.zip
end-to-end extra_json example
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r--rust/src/api_server.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 5069d15d..7adf1a1d 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -351,7 +351,7 @@ impl Server {
id: Some(row.id),
editor_id: row.editor_id,
description: row.description,
- extra: None,
+ extra: row.extra_json,
};
Ok(Some(eg))
}
@@ -693,6 +693,7 @@ impl Api for Server {
.values((
editgroup::editor_id.eq(body.editor_id as i64),
editgroup::description.eq(body.description),
+ editgroup::extra_json.eq(body.extra),
))
.get_result(&conn)
.expect("error creating edit group");
@@ -701,7 +702,7 @@ impl Api for Server {
id: Some(row.id),
editor_id: row.editor_id,
description: row.description,
- extra: None,
+ extra: row.extra_json,
};
Box::new(futures::done(Ok(
EditgroupPostResponse::SuccessfullyCreated(new_eg),