Skip to content

Commit

Permalink
examples: remove bitwise syntax for includes check
Browse files Browse the repository at this point in the history
closes #4814
  • Loading branch information
thst71 authored and dougwilson committed Feb 8, 2022
1 parent 7511d08 commit 884657d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/web-service/index.js
Expand Up @@ -34,7 +34,7 @@ app.use('/api', function(req, res, next){
if (!key) return next(error(400, 'api key required'));

// key is invalid
if (!~apiKeys.indexOf(key)) return next(error(401, 'invalid api key'));
if (apiKeys.indexOf(key) === -1) return next(error(401, 'invalid api key'))

// all good, store req.key for route access
req.key = key;
Expand Down

0 comments on commit 884657d

Please sign in to comment.