Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -10,6 +10,8 @@ const tfjs = require('@tensorflow/tfjs-node')
|
|
10 |
const nsfwjs = require('nsfwjs')
|
11 |
const jpegjs = require('jpeg-js')
|
12 |
//const { BingChat } = (await import("bing-chat")).default
|
|
|
|
|
13 |
const apikey = "@SadTeam77"
|
14 |
|
15 |
const app = express()
|
@@ -194,6 +196,25 @@ app.post('/api/nsfw-check', async (req, res) => {
|
|
194 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
195 |
}
|
196 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
/*app.post('/api/bingchat', async (req, res) => {
|
198 |
try {
|
199 |
console.log(req.body)
|
|
|
10 |
const nsfwjs = require('nsfwjs')
|
11 |
const jpegjs = require('jpeg-js')
|
12 |
//const { BingChat } = (await import("bing-chat")).default
|
13 |
+
|
14 |
+
const { insta_iwaId, insta_iwaIdUrl, insta_iwa, insta_iwaTag } = require("./lib/instagram.js")
|
15 |
const apikey = "@SadTeam77"
|
16 |
|
17 |
const app = express()
|
|
|
196 |
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
197 |
}
|
198 |
})
|
199 |
+
app.post('/api/instagram-stalk', async (req, res) => {
|
200 |
+
try {
|
201 |
+
console.log(req.body)
|
202 |
+
const { username, status } = req.body
|
203 |
+
if (!username) return res.json({ success: false, message: 'Required an data text!' })
|
204 |
+
if (!status) return res.json({ success: false, message: 'Required an status text!' })
|
205 |
+
|
206 |
+
if(status !== apikey) return res.json({ success: false, message: 'Invalid status!' })
|
207 |
+
const response = await insta_iwa(username)
|
208 |
+
res.json({
|
209 |
+
status: "ok",
|
210 |
+
result: response
|
211 |
+
})
|
212 |
+
} catch (e) {
|
213 |
+
console.log(e)
|
214 |
+
e = String(e)
|
215 |
+
res.json({ error: true, message: e === '[object Object]' ? 'Internal Server Error' : e })
|
216 |
+
}
|
217 |
+
})
|
218 |
/*app.post('/api/bingchat', async (req, res) => {
|
219 |
try {
|
220 |
console.log(req.body)
|