@thzero/library_server_validation_joi 0.16.4 → 0.16.5
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.
- package/gamer.js +7 -5
- package/index.js +10 -7
- package/package.json +3 -3
package/gamer.js
CHANGED
|
@@ -33,11 +33,13 @@ class GamerJoiValidationService extends JoiBaseValidationService {
|
|
|
33
33
|
|
|
34
34
|
gamerTagSchema = this._gamerTagPartial.required();
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
const validation = super.
|
|
38
|
-
return validation.concat(
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
settingSchema() {
|
|
37
|
+
const validation = super.settingSchema();
|
|
38
|
+
return validation.concat(this._settingGamerSchema);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
settingSchema() {
|
|
42
|
+
return this._settingGamerSchema;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
|
package/index.js
CHANGED
|
@@ -107,7 +107,7 @@ class JoiBaseValidationService extends BaseValidationService {
|
|
|
107
107
|
id: this._externalId.required(),
|
|
108
108
|
name: this._name.allow(null),
|
|
109
109
|
email: this._email.allow(null),
|
|
110
|
-
picture: this._userpicture
|
|
110
|
+
picture: this._userpicture.allow(null),
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
settingsRefreshSchema = Joi.object({
|
|
@@ -115,11 +115,18 @@ class JoiBaseValidationService extends BaseValidationService {
|
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
settingRequestSchema() {
|
|
118
|
-
return
|
|
118
|
+
return Joi.object({
|
|
119
|
+
userId: this._id.required(),
|
|
120
|
+
settings: this.settingSchema().required()
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
settingSchema() {
|
|
125
|
+
return Joi.object({});
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
userSchema = Joi.object({
|
|
122
|
-
id: this._externalId.required()
|
|
129
|
+
id: this._externalId.required(),
|
|
123
130
|
});
|
|
124
131
|
|
|
125
132
|
userUpdateSchema = Joi.object({
|
|
@@ -128,10 +135,6 @@ class JoiBaseValidationService extends BaseValidationService {
|
|
|
128
135
|
roles: Joi.array().items(this._roles).allow(null),
|
|
129
136
|
updatedTimestamp: this._timestamp.required()
|
|
130
137
|
});
|
|
131
|
-
|
|
132
|
-
_settingRequestSchema = Joi.object({
|
|
133
|
-
userId: this._id.required()
|
|
134
|
-
});
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
export default JoiBaseValidationService;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_server_validation_joi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.5",
|
|
5
5
|
"version_major": 0,
|
|
6
6
|
"version_minor": 16,
|
|
7
|
-
"version_patch":
|
|
8
|
-
"version_date": "
|
|
7
|
+
"version_patch": 5,
|
|
8
|
+
"version_date": "12/19/2022",
|
|
9
9
|
"author": "thZero",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": {
|