Update plugins/fluxai.js
Browse files- plugins/fluxai.js +2 -1
plugins/fluxai.js
CHANGED
@@ -3,6 +3,7 @@ import express from 'express';
|
|
3 |
import { Readable } from "stream";
|
4 |
import sharp from "sharp";
|
5 |
import * as config from '../config.js';
|
|
|
6 |
const FluxRoutes = express.Router();
|
7 |
|
8 |
/**
|
@@ -68,7 +69,7 @@ async function schellwithflux(args) {
|
|
68 |
* 500:
|
69 |
* description: Internal server error.
|
70 |
*/
|
71 |
-
FluxRoutes.post("/api/v1/fluxai-ai", async (req, res) => {
|
72 |
try {
|
73 |
const query = req.body.query;
|
74 |
if (!query) {
|
|
|
3 |
import { Readable } from "stream";
|
4 |
import sharp from "sharp";
|
5 |
import * as config from '../config.js';
|
6 |
+
import { authenticateApiKey, apiLimiter } from '../middleware/midware.js';
|
7 |
const FluxRoutes = express.Router();
|
8 |
|
9 |
/**
|
|
|
69 |
* 500:
|
70 |
* description: Internal server error.
|
71 |
*/
|
72 |
+
FluxRoutes.post("/api/v1/fluxai-ai", authenticateApiKey, apiLimiter, async (req, res) => {
|
73 |
try {
|
74 |
const query = req.body.query;
|
75 |
if (!query) {
|