Update index.js
Browse files
index.js
CHANGED
|
@@ -232,7 +232,9 @@ const app = express()
|
|
| 232 |
.set('json spaces', 4)
|
| 233 |
.use(morgan('dev'))
|
| 234 |
.use(express.json())
|
| 235 |
-
.all('/', (_, res) =>
|
|
|
|
|
|
|
| 236 |
"apiList": [
|
| 237 |
{
|
| 238 |
"title": "Tiktok Downloader",
|
|
@@ -265,7 +267,7 @@ const app = express()
|
|
| 265 |
"example": `${host}/ytsearch?q=`,
|
| 266 |
}
|
| 267 |
]
|
| 268 |
-
}))
|
| 269 |
.get('/yt', async (req, res) => {
|
| 270 |
const host = 'https://' + req.get('host');
|
| 271 |
try {
|
|
|
|
| 232 |
.set('json spaces', 4)
|
| 233 |
.use(morgan('dev'))
|
| 234 |
.use(express.json())
|
| 235 |
+
.all('/', (_, res) => {
|
| 236 |
+
const host = 'https://' + req.get('host');
|
| 237 |
+
res.json({
|
| 238 |
"apiList": [
|
| 239 |
{
|
| 240 |
"title": "Tiktok Downloader",
|
|
|
|
| 267 |
"example": `${host}/ytsearch?q=`,
|
| 268 |
}
|
| 269 |
]
|
| 270 |
+
})})
|
| 271 |
.get('/yt', async (req, res) => {
|
| 272 |
const host = 'https://' + req.get('host');
|
| 273 |
try {
|