Skip to content

Commit aca8519

Browse files
committed
remove min length check
1 parent eccab3d commit aca8519

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/auth/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { JoiObjectId } from '../helpers/validator';
33

44
export default {
55
apiKey: Joi.object().keys({
6-
'x-api-key': Joi.string().required().min(1)
6+
'x-api-key': Joi.string().required()
77
}).unknown(true),
88
auth: Joi.object().keys({
9-
'x-access-token': Joi.string().required().min(1),
9+
'x-access-token': Joi.string().required(),
1010
'x-user-id': JoiObjectId().required(),
1111
}).unknown(true)
1212
};

src/routes/v1/blog/schema.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export default {
99
id: JoiObjectId().required()
1010
}),
1111
blogTag: Joi.object().keys({
12-
tag: Joi.string().required().min(1)
12+
tag: Joi.string().required()
1313
}),
1414
pagination: Joi.object().keys({
15-
pageNumber: Joi.number().required().integer().min(1),
16-
pageItemCount: Joi.number().required().integer().min(1),
15+
pageNumber: Joi.number().required().integer(),
16+
pageItemCount: Joi.number().required().integer(),
1717
}),
1818
authorId: Joi.object().keys({
1919
id: JoiObjectId().required()
@@ -25,7 +25,7 @@ export default {
2525
blogUrl: JoiUrlEndpoint().required().max(200),
2626
imgUrl: Joi.string().optional().uri().max(200),
2727
score: Joi.number().optional().min(0).max(1),
28-
tags: Joi.array().optional().items(Joi.string().uppercase().min(1)),
28+
tags: Joi.array().optional().items(Joi.string().uppercase()),
2929
}),
3030
blogUpdate: Joi.object().keys({
3131
title: Joi.string().optional().min(3).max(500),
@@ -34,6 +34,6 @@ export default {
3434
blogUrl: JoiUrlEndpoint().required().max(200),
3535
imgUrl: Joi.string().optional().uri().max(200),
3636
score: Joi.number().optional().min(0).max(1),
37-
tags: Joi.array().optional().items(Joi.string().uppercase().min(1))
37+
tags: Joi.array().optional().items(Joi.string().uppercase())
3838
})
3939
};

0 commit comments

Comments
 (0)