Update middleware/midware.js
Browse files- middleware/midware.js +4 -1
middleware/midware.js
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
import { Database } from '../database/database.js';
|
2 |
import { rateLimit } from 'express-rate-limit';
|
3 |
-
import { uuidv4 } from 'uuid';
|
|
|
|
|
|
|
4 |
|
5 |
const authenticateApiKey = async (req, res, next) => {
|
6 |
const apiKey = req.headers['x-api-key'];
|
|
|
1 |
import { Database } from '../database/database.js';
|
2 |
import { rateLimit } from 'express-rate-limit';
|
3 |
+
import { v4 as uuidv4 } from 'uuid';
|
4 |
+
import uuid from 'uuid';
|
5 |
+
|
6 |
+
const uuidv4 = uuid.v4;
|
7 |
|
8 |
const authenticateApiKey = async (req, res, next) => {
|
9 |
const apiKey = req.headers['x-api-key'];
|