Skip to content

Commit

Permalink
feat: simplify routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Jan 10, 2022
1 parent e6f5a67 commit 5df63a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/routes/v1/resources/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ const querySchema = Joi.object()
page: Joi.number(),
limit: Joi.number(),
search: Joi.string(),
columns: Joi.alternatives().try(
Joi.array().items(Joi.string()).single(),
),
columns: Joi.array().items(Joi.string()).single(),
})
.with('page', 'limit');

Expand Down
4 changes: 1 addition & 3 deletions src/routes/v1/resources/units.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ const querySchema = Joi.object()
page: Joi.number(),
limit: Joi.number(),
search: Joi.string(),
columns: Joi.alternatives().try(
Joi.array().items(Joi.string()).single(),
),
columns: Joi.array().items(Joi.string()).single(),
})
.with('page', 'limit');

Expand Down

0 comments on commit 5df63a5

Please sign in to comment.