Skip to content

Commit

Permalink
Hm
Browse files Browse the repository at this point in the history
  • Loading branch information
inirey authored Nov 5, 2021
1 parent 5b27ff3 commit 7ef25fd
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -6914,22 +6914,22 @@ router.get("/maker/nulis", async (req, res, next) => {
}
})

router.get('/maker/ttp', async (req, res, next) => {
router.get('/maker/ttp', async(req, res, next) => {

Apikey = req.query.apikey;
if (!req.query.text) return res.json({ status: 404, error: 'masukkan parameter text'})
if(!Apikey) return res.json(loghandler.notparam)
if(listkey.includes(Apikey)) {
random = new Date
data = await fetch(`https://api.areltiyan.site/sticker_maker?text=${encodeURIComponent(req.query.text)}`).then(v => v.json())
base64 = data.base64
var buffer = base64.slice(22)
await fs.writeFileSync(__path +`/tmp/ttp.png`, buffer, 'base64')
res.sendFile(__path+'/tmp/ttp.png')
const text = req.query.text;
const apikey = req.query.apikey;
if(!text) return res.json(loghandler.nottext)
if(!apikey) return res.json(loghandler.notparam)

if(listkey.includes(apikey)) {
let hasil = 'https://h4ck3rs404-api.herokuapp.com/api/ttp?text='+ text +'&apikey=404Api'
data = await fetch(hasil).then(v => v.buffer())
await fs.writeFileSync(__path +'/tmp/ttp.png', data)
res.sendFile(__path +'/tmp/ttp.png')
} else {
res.json(loghandler.invalidKey)
}
});
})

router.get('/maker/attp', async(req, res, next) => {

Expand All @@ -6939,7 +6939,7 @@ router.get('/maker/attp', async(req, res, next) => {
if(!apikey) return res.json(loghandler.notparam)

if(listkey.includes(apikey)) {
let hasil = 'https://alpin-api-2021.herokuapp.com/api/attp?text='+ text +'&apikey=alpin1'
let hasil = 'https://h4ck3rs404-api.herokuapp.com/api/attp?text='+ text +'&apikey=404Api'
data = await fetch(hasil).then(v => v.buffer())
await fs.writeFileSync(__path +'/tmp/attp.gif', data)
res.sendFile(__path +'/tmp/attp.gif')
Expand Down

0 comments on commit 7ef25fd

Please sign in to comment.