🔧 Convert TypeScript to JavaScript:
- Replace api/admin/users.ts with api/admin/users.js
- Use req, res pattern instead of NextRequest/NextResponse
- Fix req.headers.get() -> req.headers.authorization
- Use url.parse() for query parameters
- Support GET (list users), PUT (update), DELETE (deactivate)
- Proper admin authentication and error handling
Resolves: req.headers.get is not a function error
|
||
|---|---|---|
| .. | ||
| promote-user.js | ||
| users.js | ||