Skip to content

Commit fa8cdbc

Browse files
author
AffanTheBest
committed
Return error when no api key
1 parent 2c9a3f5 commit fa8cdbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ app.get('/info', async(req, res) => {
7676
let users = (await manageUsers({}, 'read')).result;
7777
res.status(200).send(JSON.stringify(users.map(u => ({id: u.id, name: u.name, mail: u?.mail?.trim()}))))
7878
}
79-
res.send({})
79+
res.send(JSON.stringify({error: 'Invalid API key'}))
8080
})
8181

8282
app.listen(port, async () => console.log('listening to port ' + port));

0 commit comments

Comments
 (0)