Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.7.14 #1051

Merged
merged 8 commits into from
Apr 9, 2024
1 change: 1 addition & 0 deletions src/validations/projects.validations.js
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ export const projectsGetQuerySchema = Joi.object({
Joi.alternatives([
Joi.object({ projectIds: Joi.string().required() }).unknown(),
Joi.object({ warehouseProjectId: Joi.string().required() }).unknown(),
Joi.object({ xls: Joi.string().required() }).unknown(),
]),
{
then: Joi.object({
6 changes: 6 additions & 0 deletions src/validations/units.validations.js
Original file line number Diff line number Diff line change
@@ -83,6 +83,12 @@ export const unitsGetQuerySchema = Joi.object({
limit: Joi.number().max(100).min(1).optional(),
}),
})
.when(Joi.object({ xls: Joi.exist() }).unknown(), {
then: Joi.object({
page: Joi.number().min(1).optional(),
limit: Joi.number().max(100).min(1).optional(),
}),
})
.and('page', 'limit');

export const unitsUpdateSchema = Joi.object({