expand Justice
This commit is contained in:
parent
a16f5bb56e
commit
e244da0942
8 changed files with 69 additions and 13 deletions
|
|
@ -95,6 +95,14 @@ app.get("/top", (req, res) => {
|
|||
})
|
||||
})
|
||||
|
||||
app.get("/start", protect, async (req, res) => {
|
||||
await db.setLastPlayedToNow(req.user.name)
|
||||
|
||||
res.json({
|
||||
status: "ok"
|
||||
})
|
||||
})
|
||||
|
||||
app.use(function (err, req, res, next) {
|
||||
if (err.name === 'UnauthorizedError') {
|
||||
res.status(401).send('invalid token...');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue