Skip to content

Commit

Permalink
fix: correct min and max validation of limit param
Browse files Browse the repository at this point in the history
  • Loading branch information
lkurukulasuriya committed Mar 18, 2021
1 parent bcc4010 commit d881fe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes/tokenRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tokenRouter.get('/',
Joi.assert(
req.query,
Joi.object({
limit: Joi.number().required(),
limit: Joi.number().min(0).max(1000).required(),
start: Joi.number().min(1).max(10000).integer(),
wallet: Joi.string(),
})
Expand Down Expand Up @@ -85,7 +85,7 @@ tokenRouter.get('/:id/transactions',
Joi.assert(
req.query,
Joi.object({
limit: Joi.number().required(),
limit: Joi.number().min(0).max(1000).required(),
start: Joi.number().min(1).max(10000).integer(),
id: Joi.string().guid(),
transactions: Joi.string(),
Expand Down

0 comments on commit d881fe9

Please sign in to comment.