Skip to content

Commit

Permalink
Merge pull request #1051 from Chia-Network/develop
Browse files Browse the repository at this point in the history
Release 1.7.14
  • Loading branch information
TheLastCicada authored Apr 9, 2024
2 parents e1e1c6e + e2e7ceb commit e42f1e2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cadt",
"version": "1.7.13",
"version": "1.7.14",
"_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 Expand Up @@ -59,21 +59,21 @@
"winston-daily-rotate-file": "^4.7.1"
},
"devDependencies": {
"@babel/cli": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/plugin-syntax-import-attributes": "^7.23.3",
"@babel/preset-env": "^7.24.0",
"@babel/cli": "^7.24.1",
"@babel/core": "^7.24.4",
"@babel/plugin-syntax-import-attributes": "^7.24.1",
"@babel/preset-env": "^7.24.4",
"@babel/register": "^7.23.7",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.0.3",
"@commitlint/config-conventional": "^19.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"chai": "^5.1.0",
"chai-http": "^4.4.0",
"eslint": "^8.57.0",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-mocha": "^10.4.1",
"husky": "^9.0.11",
"mocha": "^10.3.0",
"mocha": "^10.4.0",
"semver": "^7.6.0",
"sinon": "^17.0.1",
"socket.io-client": "^4.7.5",
Expand Down
5 changes: 4 additions & 1 deletion src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ export const findAll = async (req, res) => {
}

where.marketplace = {
[Sequelize.Op.not]: 'Tokenized on Chia',
[Sequelize.Op.or]: [
{ [Sequelize.Op.is]: null },
{ [Sequelize.Op.not]: 'Tokenized on Chia' },
],
};
}

Expand Down
3 changes: 2 additions & 1 deletion src/validations/projects.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const baseSchema = {

export const projectsGetQuerySchema = Joi.object({
page: Joi.number().optional(),
limit: Joi.number().max(100).min(1).optional(),
limit: Joi.number().max(1000).min(1).optional(),
search: Joi.string().optional(),
columns: Joi.array().items(Joi.string()).single().optional(),
orgUid: Joi.string().optional(),
Expand All @@ -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({
Expand Down
8 changes: 7 additions & 1 deletion src/validations/units.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const unitsPostSchema = Joi.object({

export const unitsGetQuerySchema = Joi.object({
page: Joi.number().min(1).required(),
limit: Joi.number().max(100).min(1).required(),
limit: Joi.number().max(1000).min(1).required(),
search: Joi.string(),
warehouseUnitId: Joi.string(),
columns: Joi.array().items(Joi.string()).single(),
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit e42f1e2

Please sign in to comment.