summaryrefslogtreecommitdiffstats
path: root/rust/src/api_entity_crud.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:26:39 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:26:39 -0800
commit0f7fb8806c1a39aa54d0cd051aa48478c1b1c070 (patch)
tree4e93dd1d39c7fed0f56d7d8ef6b57fea9b60847d /rust/src/api_entity_crud.rs
parent0182cd1456ca1457747ff1363d9d5c5cf95ee2f7 (diff)
downloadfatcat-0f7fb8806c1a39aa54d0cd051aa48478c1b1c070.tar.gz
fatcat-0f7fb8806c1a39aa54d0cd051aa48478c1b1c070.zip
impl edit_id change
Diffstat (limited to 'rust/src/api_entity_crud.rs')
-rw-r--r--rust/src/api_entity_crud.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index cab6f58f..76fa9bba 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -72,8 +72,8 @@ where
ident: FatCatId,
limit: Option<i64>,
) -> Result<Vec<EntityHistoryEntry>>;
- fn db_get_edit(conn: &DbConn, edit_id: i64) -> Result<Self::EditRow>;
- fn db_delete_edit(conn: &DbConn, edit_id: i64) -> Result<()>;
+ fn db_get_edit(conn: &DbConn, edit_id: Uuid) -> Result<Self::EditRow>;
+ fn db_delete_edit(conn: &DbConn, edit_id: Uuid) -> Result<()>;
fn db_get_redirects(conn: &DbConn, ident: FatCatId) -> Result<Vec<FatCatId>>;
fn db_accept_edits(conn: &DbConn, editgroup_id: FatCatId) -> Result<u64>;
@@ -368,7 +368,7 @@ macro_rules! generic_db_get_history {
macro_rules! generic_db_get_edit {
($edit_table:ident) => {
- fn db_get_edit(conn: &DbConn, edit_id: i64) -> Result<Self::EditRow> {
+ fn db_get_edit(conn: &DbConn, edit_id: Uuid) -> Result<Self::EditRow> {
Ok($edit_table::table.find(edit_id).first(conn)?)
}
};
@@ -377,7 +377,7 @@ macro_rules! generic_db_get_edit {
macro_rules! generic_db_delete_edit {
($edit_table:ident) => {
/// This method assumes the connection is already in a transaction
- fn db_delete_edit(conn: &DbConn, edit_id: i64) -> Result<()> {
+ fn db_delete_edit(conn: &DbConn, edit_id: Uuid) -> Result<()> {
// ensure that edit hasn't been accepted
let accepted_rows: Vec<(EditgroupRow, ChangelogRow, Self::EditRow)> = editgroup::table
.inner_join(changelog::table)