Switched from sea-orm to sqlx
This commit is contained in:
@@ -5,10 +5,7 @@ use tokio::task::spawn_blocking;
|
||||
pub async fn menu(bot: Throttle<Bot>, msg: Message, db: DatabaseConnection) -> crate::Result<()> {
|
||||
let user_id = msg.from().ok_or(NoUserInfo)?.id.0;
|
||||
|
||||
let names: Vec<String> = Account::get_names(user_id, &db)
|
||||
.await?
|
||||
.try_collect()
|
||||
.await?;
|
||||
let names: Vec<String> = Account::get_names(user_id, &db).try_collect().await?;
|
||||
|
||||
if names.is_empty() {
|
||||
bot.send_message(msg.chat.id, "You don't have any accounts")
|
||||
|
Reference in New Issue
Block a user