diff options
Diffstat (limited to 'src/api/structures')
| -rw-r--r-- | src/api/structures/Route.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/structures/Route.js b/src/api/structures/Route.js index ecb2be0..8a73454 100644 --- a/src/api/structures/Route.js +++ b/src/api/structures/Route.js @@ -28,8 +28,8 @@ class Route { authorize(req, res) { if (this.options.bypassAuth) return this.run(req, res, db); if (req.headers.apiKey) return this.authorizeApiKey(req, res, req.headers.apiKey); - if (!req.headers.authorization) return res.status(401).json({ message: 'No authorization header provided' }); + const token = req.headers.authorization.split(' ')[1]; if (!token) return res.status(401).json({ message: 'No authorization header provided' }); |