randydev commited on
Commit
dd7c356
·
verified ·
1 Parent(s): c57f926

Update middleware/midware.js

Browse files
Files changed (1) hide show
  1. middleware/midware.js +3 -1
middleware/midware.js CHANGED
@@ -1,8 +1,10 @@
1
  import { Database } from '../database/database.js';
2
  import { rateLimit } from 'express-rate-limit';
3
- import { MongoStore } from "rate-limit-mongo";
4
  import { dbUri } from '../config.js';
5
 
 
 
6
  const authenticateApiKey = async (req, res, next) => {
7
  const apiKey = req.headers['x-api-key'];
8
  const dbClient = new Database("AkenoXJs");
 
1
  import { Database } from '../database/database.js';
2
  import { rateLimit } from 'express-rate-limit';
3
+ import rateLimitMongo from "rate-limit-mongo";
4
  import { dbUri } from '../config.js';
5
 
6
+ const MongoStore = rateLimitMongo;
7
+
8
  const authenticateApiKey = async (req, res, next) => {
9
  const apiKey = req.headers['x-api-key'];
10
  const dbClient = new Database("AkenoXJs");