Skip to content

Commit

Permalink
Famili 100
Browse files Browse the repository at this point in the history
  • Loading branch information
inirey authored Oct 12, 2021
1 parent 341d5ec commit e20a190
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,26 @@ router.delete("/apikey", async(req, res, next) => {
}
});

router.get('/game/family100', async (req, res, next) => {
var Apikey = req.query.apikey

if(!Apikey) return res.json(loghandler.notparam)
if(listkey.includes(Apikey)){
var soal = JSON.parse(
fs.readFileSync(__path + '/data/family100.json')
)
res
.status(200)
.json({
code: 200,
success: true,
...soal[~~(Math.random() * soal.length)]
})
} else {
res.json(loghandler.invalidKey)
}
})

router.get('/game/tebakkalimat', async (req, res, next) => {
var Apikey = req.query.apikey

Expand Down

0 comments on commit e20a190

Please sign in to comment.