This commit is contained in:
@@ -20,6 +20,9 @@ async def edit_button(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||
button.name = new_name
|
||||
button.url = new_url
|
||||
await session.commit()
|
||||
from db import log_action
|
||||
user_id = update.effective_user.id if update.effective_user else None
|
||||
log_action(user_id, "edit_button", f"old_name={name}, new_name={new_name}, new_url={new_url}")
|
||||
if update.message:
|
||||
await update.message.reply_text(f'Кнопка "{name}" изменена.')
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user