LocalStorageListener

This commit is contained in:
s-prechtl 2023-01-20 15:04:51 +01:00
parent b6ad404555
commit a0ab1b7f56
4 changed files with 70 additions and 16 deletions

View file

@ -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