fix random connection.end and repeated sql connect
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
const { getAPIKey } = require('../db/ApiKeys');
|
||||
|
||||
function apiKeyMiddleware(req, res, next) {
|
||||
const apiKey = req.headers['x-api-key'];
|
||||
|
||||
@ -14,4 +16,4 @@ function apiKeyMiddleware(req, res, next) {
|
||||
next();
|
||||
}
|
||||
|
||||
module.exports = apiKeyMiddleware;
|
||||
module.exports = { apiKeyMiddleware }
|
||||
|
Reference in New Issue
Block a user