Changes to database.get_accounts
Function is only fetching account names from db and not whole accounts now Made sorting in that function optional
This commit is contained in:
@ -38,7 +38,11 @@ def _base_handler(
|
||||
|
||||
def get_accounts(bot: telebot.TeleBot, engine: Engine, mes: Message) -> None:
|
||||
_base_handler(bot, mes)
|
||||
accounts = database.get.get_accounts(engine, mes.from_user.id)
|
||||
accounts = database.get.get_accounts(
|
||||
engine,
|
||||
mes.from_user.id,
|
||||
to_sort=True,
|
||||
)
|
||||
if not accounts:
|
||||
return _send_tmp_message(bot, mes.chat.id, "У вас нет аккаунтов")
|
||||
|
||||
|
Reference in New Issue
Block a user