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 }
|
||||
|
@ -19,4 +19,4 @@ const APIlogger = (req, res, next) => {
|
||||
|
||||
|
||||
|
||||
module.exports = { }
|
||||
module.exports = { APIlogger }
|
Reference in New Issue
Block a user