fast72 commited on
Commit
d2c5621
·
verified ·
1 Parent(s): 8a68937

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +4 -3
server.js CHANGED
@@ -18,11 +18,12 @@ const bypass = async (url) => {
18
  })
19
  }
20
 
21
- app.all('/b', async (req, res) => {
22
- const { url } = req.query || req.body
23
  const regex = /https:\/\/link2unlock\.com\/[a-zA-Z0-9]+/g
24
  if(!regex.test(url)) return res.json({ success: false, error: 'invalid link'})
25
- res.json(await bypass(url))
 
26
  })
27
 
28
  app.listen(7860)
 
18
  })
19
  }
20
 
21
+ app.get('/b', async (req, res) => {
22
+ const { url } = req.query
23
  const regex = /https:\/\/link2unlock\.com\/[a-zA-Z0-9]+/g
24
  if(!regex.test(url)) return res.json({ success: false, error: 'invalid link'})
25
+ const result = await bypass(url)
26
+ res.json(result)
27
  })
28
 
29
  app.listen(7860)