Ник (Claude)
|
05fa7644cc
|
feat: user management — detail view, block/unblock, plan change
routes/admin.js: GET /users/:id (profile+channels+balance+transactions)
PATCH /users/:id (is_blocked, plan_code, name)
plan change: cancels active sub → creates new → credits reset
generate.js: check is_blocked before generation → 403 ACCOUNT_BLOCKED
DB: users.is_blocked BOOLEAN DEFAULT false
|
2026-06-13 00:14:11 +03:00 |
|
Ник (Claude)
|
f18b83c59b
|
feat: admin dashboard API + separate admin routes file
routes/admin.js: GET /dashboard, /users, POST /credit, PATCH /plans/:id, /credit-costs/:op
index.js: app.use('/api/admin', adminRoutes) — чистый монтаж без хаков
dashboard: users (total/7d/30d), channels by platform, posts (total/today/week),
revenue (YuKassa), AI costs (30d), registrations chart (14d), pending drafts alert
|
2026-06-13 00:09:53 +03:00 |
|