Spaces:
Paused
Paused
Deploy Bot commited on
Commit ·
bfc5154
1
Parent(s): d22e23c
Restore_2nd_Admin_And_Implement_User_Management
Browse files- src/controllers/userController.js +3 -2
- src/main.js +5 -1
src/controllers/userController.js
CHANGED
|
@@ -406,9 +406,10 @@ exports.showContact = (ctx) => {
|
|
| 406 |
// Ensure i18n
|
| 407 |
const i18n = ctx.i18n || require('../locales').uz;
|
| 408 |
|
| 409 |
-
// Reply with text and
|
| 410 |
ctx.reply(i18n.contact_info, Markup.inlineKeyboard([
|
| 411 |
-
[Markup.button.url("👨💼 Admin
|
|
|
|
| 412 |
]));
|
| 413 |
};
|
| 414 |
|
|
|
|
| 406 |
// Ensure i18n
|
| 407 |
const i18n = ctx.i18n || require('../locales').uz;
|
| 408 |
|
| 409 |
+
// Reply with text and TWO buttons as requested
|
| 410 |
ctx.reply(i18n.contact_info, Markup.inlineKeyboard([
|
| 411 |
+
[Markup.button.url("👨💼 Admin (Mahsulotlar)", "https://t.me/isfandiyor_3")],
|
| 412 |
+
[Markup.button.url("🤖 Admin (Bot)", "https://t.me/IBROHM_7")]
|
| 413 |
]));
|
| 414 |
};
|
| 415 |
|
src/main.js
CHANGED
|
@@ -65,7 +65,11 @@ bot.command('admin', (ctx) => {
|
|
| 65 |
|
| 66 |
// Admin Callbacks
|
| 67 |
bot.action('admin_dashboard', (ctx) => adminController.showDashboard(ctx));
|
| 68 |
-
bot.action('admin_users', (ctx) =>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
bot.action('admin_flash_sale', (ctx) => ctx.scene.enter('admin_flash_sale'));
|
| 70 |
bot.action('admin_inventory', (ctx) => ctx.scene.enter('admin_inventory'));
|
| 71 |
bot.action('admin_delete_product', (ctx) => adminController.showDeleteProductList(ctx)); // Ensure this exists
|
|
|
|
| 65 |
|
| 66 |
// Admin Callbacks
|
| 67 |
bot.action('admin_dashboard', (ctx) => adminController.showDashboard(ctx));
|
| 68 |
+
bot.action('admin_users', (ctx) => adminController.showUsers(ctx));
|
| 69 |
+
bot.action(/admin_user_manage_(.+)/, (ctx) => adminController.manageUser(ctx, ctx.match[1]));
|
| 70 |
+
bot.action(/user_block_(.+)/, (ctx) => adminController.toggleBlockUser(ctx, ctx.match[1], true));
|
| 71 |
+
bot.action(/user_unblock_(.+)/, (ctx) => adminController.toggleBlockUser(ctx, ctx.match[1], false));
|
| 72 |
+
|
| 73 |
bot.action('admin_flash_sale', (ctx) => ctx.scene.enter('admin_flash_sale'));
|
| 74 |
bot.action('admin_inventory', (ctx) => ctx.scene.enter('admin_inventory'));
|
| 75 |
bot.action('admin_delete_product', (ctx) => adminController.showDeleteProductList(ctx)); // Ensure this exists
|