@azteam/express 1.2.243 → 1.2.244

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/validate.js +3 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.243",
3
+ "version": "1.2.244",
4
4
  "main": "src/index.js",
5
5
  "engines": {
6
6
  "node": ">= 12.0.0",
package/src/validate.js CHANGED
@@ -99,8 +99,9 @@ export const schemaVersion = (optional = false) => ({
99
99
  max: 300,
100
100
  optional,
101
101
  });
102
- export const schemaArray = (optional = false) => ({
102
+ export const schemaArray = (items, optional = false) => ({
103
103
  type: 'array',
104
+ items,
104
105
  optional,
105
106
  });
106
107
  export const schemaJSON = (optional = false) => ({
@@ -128,7 +129,6 @@ export const schemaEnum = (values, optional = false) => ({
128
129
  });
129
130
 
130
131
  /* rules */
131
-
132
132
  export const rulesId = {
133
133
  id: schemaId(),
134
134
  };
@@ -136,10 +136,7 @@ export const rulesSlug = {
136
136
  slug: schemaSlug(),
137
137
  };
138
138
  export const rulesPlatformType = {
139
- type: {
140
- type: 'enum',
141
- values: ['web', 'app'],
142
- },
139
+ type: schemaEnum(['web', 'app']),
143
140
  };
144
141
  export const rulesMetadata = {
145
142
  metadata_disable: schemaBoolean(true),