randydev commited on
Commit
595cdd3
·
verified ·
1 Parent(s): 0b5131a

Update plugins/copilot.js

Browse files
Files changed (1) hide show
  1. plugins/copilot.js +2 -1
plugins/copilot.js CHANGED
@@ -1,5 +1,6 @@
1
  import express from 'express';
2
  import { Copilot2Trip } from '../lib/scrapper.js';
 
3
  const CopilotRoutes = express.Router();
4
 
5
  /**
@@ -19,7 +20,7 @@ const CopilotRoutes = express.Router();
19
  * 200:
20
  * description: Success
21
  */
22
- CopilotRoutes.get("/api/v1/ai/copilot2-trip", async (req, res) => {
23
  try {
24
  const q = req.query.q;
25
  const results = await Copilot2Trip(q);
 
1
  import express from 'express';
2
  import { Copilot2Trip } from '../lib/scrapper.js';
3
+ import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
4
  const CopilotRoutes = express.Router();
5
 
6
  /**
 
20
  * 200:
21
  * description: Success
22
  */
23
+ CopilotRoutes.get("/api/v1/ai/copilot2-trip", authenticateApiKey, apiLimiter, async (req, res) => {
24
  try {
25
  const q = req.query.q;
26
  const results = await Copilot2Trip(q);