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:
Zakhar Izmaylov
2025-01-23 12:03:01 +03:00
parent 5a0b157529
commit 0890d326a4
4 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -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"))