diff --git a/src/handle/moderator/remove.rs b/src/handle/moderator/remove.rs index 49dcfb3..b1cecf8 100644 --- a/src/handle/moderator/remove.rs +++ b/src/handle/moderator/remove.rs @@ -29,7 +29,7 @@ pub async fn inline(bot: Bot, q: CallbackQuery, state: Arc, uid: Strin if let Some(data) = q.clone().data { let text= if &data == "yes" { if let Ok(uid) = uid.parse::() { - if Entity::delete_by_id(uid as i32).exec(&state.db).await?.rows_affected != 0 { + if Entity::delete_by_id(uid as i64).exec(&state.db).await?.rows_affected != 0 { "Модератор удалён!" } else { "Произошла ошибка!\nПо всей видимости такого модератора не существует." diff --git a/src/handle/notify.rs b/src/handle/notify.rs index 00cedc0..564e196 100644 --- a/src/handle/notify.rs +++ b/src/handle/notify.rs @@ -8,7 +8,7 @@ use crate::AppState; /// Invert notify status for moderator pub async fn command(bot: Bot, msg: Message, uid: UserId, state: Arc) -> anyhow::Result<()> { - let text = if let Some(moder) = moderators::Entity::find_by_id(uid.0 as i32).one(&state.db).await? { + let text = if let Some(moder) = moderators::Entity::find_by_id(uid.0 as i64).one(&state.db).await? { let moder = match moder.notify { true => { let mut moder = moder.into_active_model();