Update index.js
Browse files
index.js
CHANGED
@@ -26,7 +26,6 @@ import * as cheerio from 'cheerio';
|
|
26 |
import * as lifestyle from './startup/lifestyle.js';
|
27 |
|
28 |
import { Readable } from "stream";
|
29 |
-
import { tebakgambar, AnimeHentai } from './scrapper.js';
|
30 |
import { CheckMilWare } from './middleware/midware.js';
|
31 |
import { setup, serve } from './swagger.js';
|
32 |
import { swaggerOptions } from './settingOptions.js';
|
@@ -93,58 +92,4 @@ app.use(async (req, res, next) => {
|
|
93 |
await CheckMilWares.handle(req, res, next);
|
94 |
});
|
95 |
|
96 |
-
app.get('/api/v1/hentai-anime', async (req, res) => {
|
97 |
-
try {
|
98 |
-
const result = await AnimeHentai();
|
99 |
-
if (result) {
|
100 |
-
res.json({ result });
|
101 |
-
} else {
|
102 |
-
res.status(404).json({ error: "No result found." });
|
103 |
-
}
|
104 |
-
} catch (error) {
|
105 |
-
res.status(500).json({ error: error.message });
|
106 |
-
}
|
107 |
-
});
|
108 |
-
|
109 |
-
/**
|
110 |
-
* @swagger
|
111 |
-
* /api/v1/tebakgambar:
|
112 |
-
* get:
|
113 |
-
* summary: Tebak Gambar
|
114 |
-
* responses:
|
115 |
-
* 200:
|
116 |
-
* description: Success
|
117 |
-
*/
|
118 |
-
app.get('/api/v1/tebakgambar', async (req, res) => {
|
119 |
-
try {
|
120 |
-
const result = await tebakgambar();
|
121 |
-
if (result) {
|
122 |
-
res.json({ result });
|
123 |
-
} else {
|
124 |
-
res.status(404).json({ error: "No result found." });
|
125 |
-
}
|
126 |
-
} catch (error) {
|
127 |
-
res.status(500).json({ error: error.message });
|
128 |
-
}
|
129 |
-
});
|
130 |
-
|
131 |
-
/**
|
132 |
-
* @swagger
|
133 |
-
* /api/v1/gpt-old:
|
134 |
-
* get:
|
135 |
-
* summary: GPT OLD version turbo
|
136 |
-
* responses:
|
137 |
-
* 200:
|
138 |
-
* description: Success
|
139 |
-
*/
|
140 |
-
app.get('/api/v1/gpt-old', async (req, res) => {
|
141 |
-
try {
|
142 |
-
const query = req.query.query;
|
143 |
-
const results = await OpenaiRes(query);
|
144 |
-
res.json({ results });
|
145 |
-
} catch (error) {
|
146 |
-
res.status(401).json({ error: error.message });
|
147 |
-
}
|
148 |
-
});
|
149 |
-
|
150 |
lifestyle.startServer(app);
|
|
|
26 |
import * as lifestyle from './startup/lifestyle.js';
|
27 |
|
28 |
import { Readable } from "stream";
|
|
|
29 |
import { CheckMilWare } from './middleware/midware.js';
|
30 |
import { setup, serve } from './swagger.js';
|
31 |
import { swaggerOptions } from './settingOptions.js';
|
|
|
92 |
await CheckMilWares.handle(req, res, next);
|
93 |
});
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
lifestyle.startServer(app);
|