Refactor trial management function names for clarity. Renamed set_trial to update_trial in database.py and updated all related handler calls in start.py, admin_user_editor.py, and trial_key.py to reflect this change. This improves code readability and consistency across the codebase.
This commit is contained in:
@@ -16,7 +16,7 @@ from database import (
|
||||
get_key_details,
|
||||
get_keys,
|
||||
get_servers,
|
||||
set_trial,
|
||||
update_trial,
|
||||
update_key_expiry,
|
||||
)
|
||||
from filters.admin import IsAdminFilter
|
||||
@@ -207,7 +207,7 @@ async def handle_tg_id_input(message: types.Message, state: FSMContext, session:
|
||||
async def handle_restore_trial(callback_query: types.CallbackQuery, session: Any):
|
||||
tg_id = int(callback_query.data.split("_")[2])
|
||||
|
||||
await set_trial(tg_id, 0, session)
|
||||
await update_trial(tg_id, 0, session)
|
||||
|
||||
builder = InlineKeyboardBuilder()
|
||||
builder.row(InlineKeyboardButton(text="🔙 Назад в меню администратора", callback_data="admin"))
|
||||
|
||||
Reference in New Issue
Block a user