Fix promote-user endpoint request body parsing

🔧 Fix:
- Use req.body directly instead of req.text() + JSON.parse()
- Match pattern used in working auth endpoints
- Should resolve NOT_FOUND and parsing issues
This commit is contained in:
Randall Stillwell 2025-07-22 07:09:14 -05:00
parent f7735ba8d9
commit 028c5396f3

View file

@ -11,8 +11,7 @@ export default async function handler(req, res) {
} }
try { try {
const body = JSON.parse(req.body || '{}'); const { username, userId } = req.body;
const { username, userId } = body;
if (!username && !userId) { if (!username && !userId) {
return res.status(400).json({ return res.status(400).json({