🔧 Admin Management:
- Add api/admin/promote-user.js endpoint
- Allows promoting users to admin role by username or userId
- Checks for existing admin status
- Returns updated user info with roles
- Handles database errors gracefully
Usage: POST /api/admin/promote-user with { username: 'testuser' }
|
||
|---|---|---|
| .. | ||
| admin | ||
| auth | ||
| v1/cards | ||
| debug.js | ||
| migrate.ts | ||
| setup-auth.js | ||
| simple.js | ||
| tsconfig.json | ||