fix: allow empty string to search product route
This commit is contained in:
1 parent
81847456f1
commit
52c47abd40
1 file changed
+3
-1
@@ -4,7 +4,9 @@ import ProductService from "../../../../services/product"
|
|||||||
export default async (req, res) => {
|
export default async (req, res) => {
|
||||||
const schema = Validator.object()
|
const schema = Validator.object()
|
||||||
.keys({
|
.keys({
|
||||||
q: Validator.string().required(),
|
q: Validator.string()
|
||||||
|
.required()
|
||||||
|
.allow(""),
|
||||||
offset: Validator.number().optional(),
|
offset: Validator.number().optional(),
|
||||||
limit: Validator.number().optional(),
|
limit: Validator.number().optional(),
|
||||||
filter: Validator.any(),
|
filter: Validator.any(),
|
||||||
|
|||||||
Reference in new issue
Block a user