randydev commited on
Commit
ab00768
·
verified ·
1 Parent(s): 03eff68

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +0 -25
index.js CHANGED
@@ -132,7 +132,6 @@ app.get('/api/v1/hentai-anime', async (req, res) => {
132
  }
133
  });
134
 
135
-
136
  app.get('/api/v1/tebakgambar', async (req, res) => {
137
  try {
138
  const result = await tebakgambar();
@@ -156,28 +155,4 @@ app.get('/api/v1/gpt-old', async (req, res) => {
156
  }
157
  });
158
 
159
- app.post("/api/v1/fluxai-ai", async (req, res) => {
160
- try {
161
- const query = req.body.query;
162
- const imageBytes = await schellwithflux(query);
163
- if (!query) {
164
- return res.status(400).send('Query parameter is missing');
165
- }
166
- if (!imageBytes) {
167
- return res.status(500).json({ error: "Failed to fetch image bytes" });
168
- }
169
- const buffer = Buffer.isBuffer(imageBytes) ? imageBytes : Buffer.from(imageBytes);
170
-
171
- const processedImage = await sharp(buffer)
172
- .jpeg()
173
- .toBuffer();
174
- res.set("Content-Type", "image/jpeg");
175
- const stream = Readable.from(processedImage);
176
- stream.pipe(res);
177
- } catch (error) {
178
- console.error("Error processing image:", error.message);
179
- res.status(500).json({ error: "Internal server error" });
180
- }
181
- });
182
-
183
  lifestyle.startServer(app);
 
132
  }
133
  });
134
 
 
135
  app.get('/api/v1/tebakgambar', async (req, res) => {
136
  try {
137
  const result = await tebakgambar();
 
155
  }
156
  });
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  lifestyle.startServer(app);