Update index.js
Browse files
index.js
CHANGED
|
@@ -74,7 +74,7 @@ const app = express()
|
|
| 74 |
.get('/yt', async (req, res) => {
|
| 75 |
const host = 'https://' + req.get('host')
|
| 76 |
try {
|
| 77 |
-
|
| 78 |
if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' })
|
| 79 |
if (!!json) {
|
| 80 |
let ytId = ytIdRegex.exec(url)?.[1]
|
|
|
|
| 74 |
.get('/yt', async (req, res) => {
|
| 75 |
const host = 'https://' + req.get('host')
|
| 76 |
try {
|
| 77 |
+
let { url, type, quality, json } = req.query
|
| 78 |
if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' })
|
| 79 |
if (!!json) {
|
| 80 |
let ytId = ytIdRegex.exec(url)?.[1]
|