diff --git a/src/commands.rs b/src/commands.rs index c91dcec..c6be204 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -195,7 +195,7 @@ impl CommandHandler { let data = match bot_s .controller - .get_records_by_userid_with_pagination(someone.id, page) + .get_records_by_userid_with_pagination(someone.tg_uid, page) .await { Ok(data) => data, diff --git a/src/db_controller.rs b/src/db_controller.rs index 8178b70..db25408 100644 --- a/src/db_controller.rs +++ b/src/db_controller.rs @@ -98,7 +98,7 @@ impl Controller { transaction: &DatabaseTransaction, ) -> Result, DbErr> { User::find() - .filter(UserColumn::Id.eq(user_id.to_owned())) + .filter(UserColumn::TgUid.eq(user_id.to_owned())) .one(transaction) .await }