diff options
Diffstat (limited to 'rust/src/endpoints.rs')
-rw-r--r-- | rust/src/endpoints.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rust/src/endpoints.rs b/rust/src/endpoints.rs index 33c4bc3e..f7e93448 100644 --- a/rust/src/endpoints.rs +++ b/rust/src/endpoints.rs @@ -754,7 +754,10 @@ impl Api for Server { let limit = cmp::min(100, limit.unwrap_or(20)) as u64; let rows = Editgroup::db_get_range_for_editor(&conn, editor_id, limit, since, before)?; - Ok(rows.into_iter().map(|(eg, cl)| eg.into_model_partial(cl.map(|v| v.id))).collect()) + Ok(rows + .into_iter() + .map(|(eg, cl)| eg.into_model_partial(cl.map(|v| v.id))) + .collect()) }) .map_err(|e: Error| FatcatError::from(e)) { @@ -892,8 +895,10 @@ impl Api for Server { .transaction(|| { let limit = cmp::min(100, limit.unwrap_or(20)) as u64; let row = Editgroup::db_get_range_reviewable(&conn, limit, since, before)?; - let mut editgroups: Vec<Editgroup> = - row.into_iter().map(|eg| eg.into_model_partial(None)).collect(); + let mut editgroups: Vec<Editgroup> = row + .into_iter() + .map(|eg| eg.into_model_partial(None)) + .collect(); if let Some(expand) = expand { let expand = ExpandFlags::from_str(&expand)?; for eg in editgroups.iter_mut() { @@ -1031,7 +1036,6 @@ impl Api for Server { annotation.editor_id = Some(auth_context.editor_id.to_string()); } }; - // TODO: verify editgroup_id annotation.db_create(&conn).map(|a| a.into_model()) }) .map_err(|e: Error| FatcatError::from(e)) |