allow longer cursors

This commit is contained in:
Andris Reinman 2017-09-04 14:49:04 +03:00
parent 39049ef497
commit 3df13f7fee
4 changed files with 18 additions and 12 deletions

View file

@ -19,11 +19,13 @@ module.exports = (db, server) => {
.min(1)
.max(250),
next: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
prev: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
page: Joi.number().default(1)
});

View file

@ -98,11 +98,11 @@ module.exports = (db, server, userHandler) => {
next: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
previous: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
page: Joi.number()
.empty('')
.default(1)

View file

@ -35,11 +35,11 @@ module.exports = (db, server, messageHandler) => {
next: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
previous: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
page: Joi.number()
.empty('')
.default(1)
@ -249,11 +249,13 @@ module.exports = (db, server, messageHandler) => {
.min(1)
.max(250),
next: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
previous: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
page: Joi.number().default(1)
});

View file

@ -15,20 +15,22 @@ module.exports = (db, server, userHandler) => {
const schema = Joi.object().keys({
query: Joi.string()
.empty('')
.alphanum()
.lowercase()
.empty('')
.max(100),
.max(128),
limit: Joi.number()
.default(20)
.min(1)
.max(250),
next: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
previous: Joi.string()
.empty('')
.alphanum()
.max(100),
.max(1024),
page: Joi.number().default(1)
});