Skip to content

Commit 544c05e

Browse files
committed
remove assingee and status from validator
1 parent 940194b commit 544c05e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

middlewares/validators/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const getTasksValidator = async (req, res, next) => {
170170
.custom((value, helpers) => {
171171
if (value && value.includes(":")) {
172172
const [key] = value.split(":");
173-
const allowedKeywords = ["searchterm", "assignee", "status"];
173+
const allowedKeywords = ["searchterm"];
174174
if (!allowedKeywords.includes(key.toLowerCase())) {
175175
return helpers.error("any.invalid");
176176
}

test/integration/tasks.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ describe("Tasks", function () {
279279
matchingTasks.forEach((task) => {
280280
expect(task.title.toLowerCase()).to.include(searchTerm.toLowerCase());
281281
});
282+
expect(matchingTasks).to.have.length(2);
282283

283284
return done();
284285
});

0 commit comments

Comments
 (0)