Skip to content

Commit

Permalink
Ok
Browse files Browse the repository at this point in the history
  • Loading branch information
inirey authored Oct 19, 2021
1 parent d1c7d95 commit 9417a6c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,33 @@ router.get('/download/ig', async(req, res, next) => {
}
});

router.get('/download/smule', async(req, res, next) => {
const apikey = req.query.apikey;
const url = req.query.url;

if(!url) return res.json(loghandler.noturl)
if(!apikey) return res.json(loghandler.notparam)

if(listkey.includes(apikey)){
fetch(encodeURI(`https://mnazria.herokuapp.com/api/smule?link=${url}`))
.then(response => response.json())
.then(hasil => {

var result = hasil.result;
res.json({
status : true,
creator : `${creator}`,
result
})
})
.catch(e => {
res.json(loghandler.error)
})
} else {
res.json(loghandler.invalidKey)
}
})

router.get('/download/joox2', async(req, res, next) => {
const apikey = req.query.apikey;
const query = req.query.query;
Expand Down

0 comments on commit 9417a6c

Please sign in to comment.