Enhance bulk promo code creation with CSV export functionality
- Added the ability to generate and send a CSV file containing created promo codes, improving data accessibility for admins. - Updated success messages to inform users about the CSV file and the number of created promo codes. - Refactored the promo code creation logic to include detailed validity information and links for activation in the CSV output. - Improved localization for bulk promo creation messages to enhance user experience.
This commit is contained in:
@@ -224,7 +224,7 @@ async def start_command_handler(message: types.Message,
|
||||
if promo_code_to_apply:
|
||||
try:
|
||||
from bot.services.promo_code_service import PromoCodeService
|
||||
promo_code_service = PromoCodeService()
|
||||
promo_code_service = PromoCodeService(settings, subscription_service, bot, i18n)
|
||||
|
||||
success, result = await promo_code_service.apply_promo_code(
|
||||
session, user_id, promo_code_to_apply, current_lang
|
||||
|
||||
Reference in New Issue
Block a user