diff --git a/package.json b/package.json index fe8274a..bab864a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dashboard-creator-server", "private": false, - "version": "3.1.0", + "version": "3.1.1", "license": "MIT", "main": "src/server.ts", "engines": { diff --git a/src/components/dapp-analytics/dapp-analytics.validation.ts b/src/components/dapp-analytics/dapp-analytics.validation.ts index e9f8a0c..26a94ea 100644 --- a/src/components/dapp-analytics/dapp-analytics.validation.ts +++ b/src/components/dapp-analytics/dapp-analytics.validation.ts @@ -119,18 +119,26 @@ export const dappDataMetricsValidation = { args: Joi.object().pattern( Joi.string(), Joi.object({ - type: Joi.string().valid('integer', 'string', 'boolean').required(), + type: Joi.string() + .valid('integer', 'number', 'string', 'boolean') + .required(), conditions: Joi.array().items( Joi.object({ operator: Joi.string() .valid('>', '<', '>=', '<=', '=', '!=') .required(), - value: Joi.alternatives() - .try(Joi.number(), Joi.string(), Joi.boolean()) - .required(), + value: Joi.alternatives().try( + Joi.boolean(), + Joi.number(), + Joi.string().allow(''), + ), }), ), - value: Joi.alternatives().try(Joi.string(), Joi.boolean()), + value: Joi.alternatives().try( + Joi.boolean(), + Joi.number(), + Joi.string().allow(''), + ), }), ), }),