NekonekoID commited on
Commit
53d2eb4
·
verified ·
1 Parent(s): d3b5da5

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +10 -0
index.js CHANGED
@@ -124,6 +124,16 @@ app.all(['/webp2gif', '/webp2mp4'], async (req, res) => {
124
  }
125
  })
126
 
 
 
 
 
 
 
 
 
 
 
127
  app.all(['/enhance', '/hd', '/upscale'], async (req, res) => {
128
  if (!['GET', 'POST'].includes(req.method)) return res.status(405).json({ success: false, message: 'Method Not Allowed' })
129
 
 
124
  }
125
  })
126
 
127
+ app.get('/fetch', async (req, res) => {
128
+ try {
129
+ if (!req.query.url) return res.json({ message: 'Required an url' })
130
+ let json = await axios.get(req.query.url)
131
+ res.json(json.data)
132
+ } catch (e) {
133
+ res.send(e)
134
+ }
135
+ })
136
+
137
  app.all(['/enhance', '/hd', '/upscale'], async (req, res) => {
138
  if (!['GET', 'POST'].includes(req.method)) return res.status(405).json({ success: false, message: 'Method Not Allowed' })
139