Item purchase
This commit is contained in:
11
src/index.js
11
src/index.js
@@ -239,6 +239,9 @@ bot.on('callback_query', async (callbackQuery) => {
|
||||
} else if (action.startsWith('buy_product_')) {
|
||||
logDebug(action, 'handleBuyProduct');
|
||||
await userProductHandler.handleBuyProduct(callbackQuery);
|
||||
} else if (action.startsWith('pay_with_')) {
|
||||
logDebug(action, 'handlePay');
|
||||
await userProductHandler.handlePay(callbackQuery);
|
||||
}
|
||||
// Admin location management
|
||||
else if (action === 'add_location') {
|
||||
@@ -287,7 +290,7 @@ bot.on('callback_query', async (callbackQuery) => {
|
||||
logDebug(action, 'handleSubcategorySelection');
|
||||
await adminProductHandler.handleSubcategorySelection(callbackQuery);
|
||||
} else if (action.startsWith('list_products_')) {
|
||||
logDebug(action, 'handleSubcategorySelection');
|
||||
logDebug(action, 'handleProductListPage');
|
||||
await adminProductHandler.handleProductListPage(callbackQuery);
|
||||
} else if (action.startsWith('add_product_')) {
|
||||
logDebug(action, 'handleAddProduct');
|
||||
@@ -299,7 +302,7 @@ bot.on('callback_query', async (callbackQuery) => {
|
||||
logDebug(action, 'handleProductEdit');
|
||||
await adminProductHandler.handleProductEdit(callbackQuery)
|
||||
} else if (action.startsWith('delete_product_')) {
|
||||
logDebug(action, 'handleViewProduct');
|
||||
logDebug(action, 'handleProductDelete');
|
||||
await adminProductHandler.handleProductDelete(callbackQuery);
|
||||
} else if (action.startsWith('confirm_delete_product_')) {
|
||||
logDebug(action, 'handleConfirmDelete');
|
||||
@@ -310,13 +313,13 @@ bot.on('callback_query', async (callbackQuery) => {
|
||||
logDebug(action, 'handleViewUser');
|
||||
await adminUserHandler.handleViewUser(callbackQuery);
|
||||
} else if (action.startsWith('list_users_')) {
|
||||
logDebug(action, 'handleViewUser');
|
||||
logDebug(action, 'handleUserListPage');
|
||||
await adminUserHandler.handleUserListPage(callbackQuery);
|
||||
} else if (action.startsWith('delete_user_')) {
|
||||
logDebug(action, 'handleDeleteUser');
|
||||
await adminUserHandler.handleDeleteUser(callbackQuery);
|
||||
} else if (action.startsWith('block_user_')) {
|
||||
logDebug(action, 'handleDeleteUser');
|
||||
logDebug(action, 'handleBlockUser');
|
||||
await adminUserHandler.handleBlockUser(callbackQuery);
|
||||
} else if (action.startsWith('confirm_delete_user_')) {
|
||||
logDebug(action, 'handleConfirmDelete');
|
||||
|
||||
Reference in New Issue
Block a user