summaryrefslogtreecommitdiffstats
path: root/rust/src/api_wrappers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/api_wrappers.rs')
-rw-r--r--rust/src/api_wrappers.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/src/api_wrappers.rs b/rust/src/api_wrappers.rs
index aa168076..cf696d15 100644
--- a/rust/src/api_wrappers.rs
+++ b/rust/src/api_wrappers.rs
@@ -327,12 +327,13 @@ macro_rules! wrap_entity_handlers {
fn $get_edit_fn(
&self,
- edit_id: i64,
+ edit_id: String,
_context: &Context,
) -> Box<Future<Item = $get_edit_resp, Error = ApiError> + Send> {
let conn = self.db_pool.get().expect("db_pool error");
// No transaction for GET?
let ret = match (|| {
+ let edit_id = Uuid::from_str(&edit_id)?;
$model::db_get_edit(&conn, edit_id)?.into_model()
})() {
Ok(edit) =>
@@ -351,11 +352,12 @@ macro_rules! wrap_entity_handlers {
fn $delete_edit_fn(
&self,
- edit_id: i64,
+ edit_id: String,
_context: &Context,
) -> Box<Future<Item = $delete_edit_resp, Error = ApiError> + Send> {
let conn = self.db_pool.get().expect("db_pool error");
let ret = match conn.transaction(|| {
+ let edit_id = Uuid::from_str(&edit_id)?;
$model::db_delete_edit(&conn, edit_id)
}) {
Ok(()) =>