forked from kiryudev/Flikers-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
28 lines (26 loc) · 903 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const express = require('express');
const axios = require('axios');
const app = express();
app.get('/api/react', (req, res) => {
const { link, type, cookie } = req.query;
axios.post("https://flikers.net/android/android_get_react.php", {
post_id: link,
react_type: type,
version: "v1.7"
}, {
headers: {
'User-Agent': "Dalvik/2.1.0 (Linux; U; Android 12; V2134 Build/SP1A.210812.003)",
'Connection': "Keep-Alive",
'Accept-Encoding': "gzip",
'Content-Type': "application/json",
'Cookie': cookie
}
})
.then(dat => { res.json(dat.data); })
.catch(e => {
console.error(e);
res.json({ error: 'an error occurred' });
});
});
// const port = Math.floor(Math.random() * (6000 - 3000 + 1)) + 3000;
app.listen(3000, () => { console.log('Live'); });