From aa6ceb46b5801b2f2e058cae0bc1d95f3edb2f8f Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Fri, 3 Oct 2025 22:12:07 -0600 Subject: [PATCH] Gwug --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 57440e3..a56ba6d 100644 --- a/index.js +++ b/index.js @@ -594,11 +594,13 @@ app.patch('/api/v1/user/update', async (req, res) => { // Update users server, p const apiKey = req.headers['authorization']; console.log(`API Key: ${apiKey}`); if (!apiKey) { - res.status(401).json({ error: 'Unauthorized' }); + console.log("No API key provided"); + res.status(401).json({ error: 'API Key is required!' }); return; } const oldData = await pool.query("SELECT * FROM routes WHERE apiKey = ?", [apiKey]); if (!oldData || oldData.length === 0) { + console.log("No data found for API key"); res.status(401).json({ error: 'Unauthorized' }); return; }