🔧 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
|
||
|---|---|---|
| .. | ||
| admin | ||
| auth | ||
| v1/cards | ||
| debug.js | ||
| make-admin.js | ||
| migrate.ts | ||
| promote-testuser.js | ||
| setup-auth.js | ||
| simple.js | ||
| tsconfig.json | ||