Final touches!
This commit is contained in:
parent
b08c610a8f
commit
ba9013d9a9
1
index.js
1
index.js
|
|
@ -592,7 +592,6 @@ app.put('/api/v1/user/route', (req, res) => { // Update route
|
|||
|
||||
app.patch('/api/v1/user/update', async (req, res) => { // Update users server, port, auth, or secret via API key instead of session. Used for automated scripts
|
||||
const apiKey = req.headers['authorization'] ? req.headers['authorization'].replace('Bearer ', '') : null;
|
||||
console.log(`API Key: ${apiKey}`);
|
||||
if (!apiKey) {
|
||||
res.status(401).json({ error: 'API Key is required!' });
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue