diff options
Diffstat (limited to 'build/index.js')
-rw-r--r-- | build/index.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/build/index.js b/build/index.js index e6d0ff3..11b2fc6 100644 --- a/build/index.js +++ b/build/index.js @@ -12,8 +12,7 @@ exports.debug = false; app.use((req, res, next) => { if (process.env.key && req.headers.key !== process.env.key) // if a key is set in process.env and the header doesn't match return an error - // TODO: make this have a status code - return res.json({ error: 'Key in header must match key in env' }); + return res.status(401).json({ error: 'Key in header must match key in env' }); next(); }); app.get('/', async (req, res) => { |