Feedback rank in game

This commit is contained in:
KGrzeg 2021-10-18 00:44:02 +02:00
parent 4497d0fb44
commit 15cf78bf74
5 changed files with 57 additions and 12 deletions

View file

@ -78,9 +78,13 @@ app.post("/login", neededArguments(['key']), async (req, res) => {
app.post("/record", protect, neededArguments(['points', 'shoots', 'time']), jg, async (req, res) => {
db.updateRecord(req.user.name, req.body.points)
const rank = db.getRank(req.user.name)
console.log(req.user, rank)
res.json({
status: "ok"
status: "ok",
rank: rank
})
})