@cocreate/users 1.39.1 → 1.39.3
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/server.js +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.39.3](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.2...v1.39.3) (2026-04-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* data.userKey.object.key assignment after user creation ([8fe7ff5](https://github.com/CoCreate-app/CoCreate-users/commit/8fe7ff58119a7973c2b30b507b7768f0f109d74c))
|
|
7
|
+
|
|
8
|
+
## [1.39.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.1...v1.39.2) (2026-04-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* await user creation and set userKey if provided ([5048619](https://github.com/CoCreate-app/CoCreate-users/commit/50486192da29d2f68a05bbab7c6c0eae5825e081))
|
|
14
|
+
|
|
1
15
|
## [1.39.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.39.0...v1.39.1) (2026-04-04)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -41,12 +41,22 @@ class CoCreateUser {
|
|
|
41
41
|
if (data.user) {
|
|
42
42
|
data.user.method = "object.create";
|
|
43
43
|
data.user.host = data.host;
|
|
44
|
-
|
|
44
|
+
if (!data.user.organization_id) {
|
|
45
|
+
data.user.organization_id = data.organization_id;
|
|
46
|
+
data.userKey.organization_id = data.organization_id;
|
|
47
|
+
}
|
|
48
|
+
let createdUser = await this.crud.send(data.user);
|
|
49
|
+
if (data.userKey && createdUser.object[0] && createdUser.object[0]._id) {
|
|
50
|
+
data.userKey.object.key = createdUser.object[0]._id;
|
|
51
|
+
}
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
if (data.userKey) {
|
|
48
55
|
data.userKey.method = "object.create";
|
|
49
56
|
data.userKey.host = data.host;
|
|
57
|
+
if (!data.userKey.organization_id) {
|
|
58
|
+
data.userKey.organization_id = data.organization_id;
|
|
59
|
+
}
|
|
50
60
|
await this.crud.send(data.userKey);
|
|
51
61
|
}
|
|
52
62
|
|