diff options
Diffstat (limited to 'rust')
-rw-r--r-- | rust/src/api_server.rs | 5 | ||||
-rw-r--r-- | rust/src/database_models.rs | 2 | ||||
-rw-r--r-- | rust/src/database_schema.rs | 3 |
3 files changed, 5 insertions, 5 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), diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 8e93d69e..d871d55d 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -181,7 +181,7 @@ pub struct FileReleaseRow { #[table_name = "editgroup"] pub struct EditgroupRow { pub id: i64, - //pub extra_json: Option<serde_json::Value>, + pub extra_json: Option<serde_json::Value>, pub editor_id: i64, pub description: Option<String>, } diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs index a3b9cf2f..6856b19c 100644 --- a/rust/src/database_schema.rs +++ b/rust/src/database_schema.rs @@ -64,7 +64,7 @@ table! { table! { editgroup (id) { id -> Int8, - //extra_json -> Nullable<Json>, + extra_json -> Nullable<Json>, editor_id -> Int8, description -> Nullable<Text>, } @@ -108,7 +108,6 @@ table! { table! { file_rev (id) { id -> Int8, - //extra_json -> Nullable<Json>, size -> Nullable<Int8>, sha1 -> Nullable<Text>, url -> Nullable<Text>, |