From 028c5396f30373497a0f9242181bf801c70ea9a5 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Tue, 22 Jul 2025 07:09:14 -0500 Subject: [PATCH] Fix promote-user endpoint request body parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔧 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 --- api/admin/promote-user.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/admin/promote-user.js b/api/admin/promote-user.js index 303337a..02e3140 100644 --- a/api/admin/promote-user.js +++ b/api/admin/promote-user.js @@ -11,8 +11,7 @@ export default async function handler(req, res) { } try { - const body = JSON.parse(req.body || '{}'); - const { username, userId } = body; + const { username, userId } = req.body; if (!username && !userId) { return res.status(400).json({