LocalStorageListener
This commit is contained in:
parent
b6ad404555
commit
a0ab1b7f56
4 changed files with 70 additions and 16 deletions
|
|
@ -9,6 +9,9 @@ export const gameRoute = express.Router()
|
|||
|
||||
gameRoute.use(express.json())
|
||||
|
||||
/**
|
||||
* Test
|
||||
*/
|
||||
gameRoute.post(
|
||||
'/add',
|
||||
body('playtime')
|
||||
|
|
@ -18,6 +21,8 @@ gameRoute.post(
|
|||
body('userId')
|
||||
.isInt({min: 1})
|
||||
.custom(userWithIdExists),
|
||||
body('score')
|
||||
.isInt({min: 0}),
|
||||
/**
|
||||
* After processing the errors of express-validator, inserts the game into the DB
|
||||
* @param req
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue