@live-change/user-service 0.2.33 → 0.2.39
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/package.json +2 -2
- package/sessionOrUserProperty.js +13 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-service",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@live-change/relations-plugin": "0.6.5",
|
|
26
26
|
"pluralize": "8.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "09bd3c0c5e1991360c8f13c30b29ccca8f3158ea"
|
|
29
29
|
}
|
package/sessionOrUserProperty.js
CHANGED
|
@@ -137,11 +137,11 @@ definition.processor(function(service, app) {
|
|
|
137
137
|
const data = App.utils.mergeDeep({}, defaults, newObject)
|
|
138
138
|
await App.validation.validate(data, validators, { source: action, action, service, app, client })
|
|
139
139
|
const identifiers = client.user ? {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
sessionOrUserType: 'user_User',
|
|
141
|
+
sessionOrUser: client.user,
|
|
142
142
|
} : {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
sessionOrUserType: 'session_Session',
|
|
144
|
+
sessionOrUser: client.session,
|
|
145
145
|
}
|
|
146
146
|
emit({
|
|
147
147
|
type: eventName,
|
|
@@ -180,11 +180,11 @@ definition.processor(function(service, app) {
|
|
|
180
180
|
const merged = App.utils.mergeDeep({}, entity, updateObject)
|
|
181
181
|
await App.validation.validate(merged, validators, { source: action, action, service, app, client })
|
|
182
182
|
const identifiers = client.user ? {
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
sessionOrUserType: 'user_User',
|
|
184
|
+
sessionOrUser: client.user,
|
|
185
185
|
} : {
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
sessionOrUserType: 'session_Session',
|
|
187
|
+
sessionOrUser: client.session,
|
|
188
188
|
}
|
|
189
189
|
emit({
|
|
190
190
|
type: eventName,
|
|
@@ -211,11 +211,11 @@ definition.processor(function(service, app) {
|
|
|
211
211
|
const entity = await modelRuntime().get(id)
|
|
212
212
|
if (!entity) throw 'not_found'
|
|
213
213
|
const identifiers = client.user ? {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
sessionOrUserType: 'user_User',
|
|
215
|
+
sessionOrUser: client.user,
|
|
216
216
|
} : {
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
sessionOrUserType: 'session_Session',
|
|
218
|
+
sessionOrUser: client.session,
|
|
219
219
|
}
|
|
220
220
|
emit({
|
|
221
221
|
type: eventName,
|
|
@@ -228,4 +228,4 @@ definition.processor(function(service, app) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
})
|
|
231
|
+
})
|