randydev commited on
Commit
b41d8cd
·
verified ·
1 Parent(s): b37c4d7

Update plugins/fluxai.js

Browse files
Files changed (1) hide show
  1. plugins/fluxai.js +4 -3
plugins/fluxai.js CHANGED
@@ -97,7 +97,7 @@ FluxRoutes.get('/api/v1/flux/black-forest-labs/flux-1-schnell', authenticateApiK
97
  * description: API key for authentication.
98
  * schema:
99
  * type: string
100
- * example: "your-api-key-here"
101
  * responses:
102
  * 200:
103
  * description: A successfully processed image.
@@ -129,9 +129,10 @@ FluxRoutes.get('/api/v1/flux/black-forest-labs/flux-1-schnell', authenticateApiK
129
  */
130
  FluxRoutes.post("/api/v1/flux/fluxai-ai", authenticateApiKey, apiLimiter, async (req, res) => {
131
  try {
132
- const query = req.body.query;
 
133
  if (!query) {
134
- return res.status(400).send("Query parameter is missing");
135
  }
136
 
137
  const imageBytes = await schellwithflux(query);
 
97
  * description: API key for authentication.
98
  * schema:
99
  * type: string
100
+ * example: "lu-api-key"
101
  * responses:
102
  * 200:
103
  * description: A successfully processed image.
 
129
  */
130
  FluxRoutes.post("/api/v1/flux/fluxai-ai", authenticateApiKey, apiLimiter, async (req, res) => {
131
  try {
132
+ const { query } = req.body;
133
+
134
  if (!query) {
135
+ return res.status(400).json({ error: "Query parameter is missing" });
136
  }
137
 
138
  const imageBytes = await schellwithflux(query);