Skip to content

Commit

Permalink
Merge pull request #1023 from Chia-Network/hotfix-1.7.10
Browse files Browse the repository at this point in the history
hotfix-1.3.17: do not require pagination when projectIds is used as a query param
  • Loading branch information
TheLastCicada authored Mar 6, 2024
2 parents dc53674 + c9b32cc commit 5cfdc6c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cadt",
"version": "1.7.9",
"version": "1.7.10",
"_comment": "DONT CHANGE MAJOR UNLESS DATAMODEL CHANGES: The major version corresponds to the datamodel version your using, so 2.0.0 means it'll use datamodel v2",
"private": true,
"bin": "build/server.js",
Expand Down
12 changes: 12 additions & 0 deletions src/validations/projects.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ export const projectsGetQuerySchema = Joi.object({
}),
},
)
.when(
Joi.object({
projectIds: Joi.array().items(Joi.string()).single().min(1),
}),
{
then: Joi.object(),
otherwise: Joi.object({
page: Joi.number().required(),
limit: Joi.number().required(),
}),
},
)
.and('page', 'limit');

export const projectsPostSchema = Joi.object({
Expand Down

0 comments on commit 5cfdc6c

Please sign in to comment.