Epikcoder commited on
Commit
979da76
·
1 Parent(s): b5c3bc8

varo gendeng

Browse files
Files changed (1) hide show
  1. beta.js +4 -0
beta.js CHANGED
@@ -60,9 +60,13 @@ app.get("/", (req, res) => {
60
  })
61
 
62
  app.all("/down", async(req,res) => {
 
63
  const {url} = req.query;
64
  if(!url) return res.json({error: "invalid url/nourl"})
65
  return res.json(await main(url))
 
 
 
66
  })
67
  app.use(express.static(path.join(__dirname, 'output')));
68
 
 
60
  })
61
 
62
  app.all("/down", async(req,res) => {
63
+ try{
64
  const {url} = req.query;
65
  if(!url) return res.json({error: "invalid url/nourl"})
66
  return res.json(await main(url))
67
+ }catch(e) {
68
+ return res.json(export)
69
+ }
70
  })
71
  app.use(express.static(path.join(__dirname, 'output')));
72