const token = process.argv[2]; if (!token) { console.error("Usage: node .\\checkAdmin.js "); process.exit(1); } async function checkAdmin() { try { const response = await fetch("http://localhost:3000/admin", { method: "GET", headers: { Authorization: `Bearer ${token}`, }, }); const body = await response.text(); console.log(`Status: ${response.status}`); console.log(`Response: ${body}`); } catch (error) { console.error("Request failed:", error.message); process.exit(1); } } checkAdmin();