@cocreate/users 1.27.7 → 1.28.0
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 +7 -0
- package/package.json +1 -1
- package/src/client.js +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.28.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.7...v1.28.0) (2023-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* ObjectId() returns an object containg the parts iof the _id along with a toString() function ([2c28ca9](https://github.com/CoCreate-app/CoCreate-users/commit/2c28ca9ec2e48e91c127347052ac1b85f3c86e57))
|
|
7
|
+
|
|
1
8
|
## [1.27.7](https://github.com/CoCreate-app/CoCreate-users/compare/v1.27.6...v1.27.7) (2023-10-20)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Crud from '@cocreate/crud-client';
|
|
3
3
|
import Actions from '@cocreate/actions';
|
|
4
4
|
import Elements from '@cocreate/elements';
|
|
5
|
-
import
|
|
5
|
+
import render from '@cocreate/render';
|
|
6
6
|
import '@cocreate/element-prototype';
|
|
7
7
|
import './index.css';
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ const CoCreateUser = {
|
|
|
35
35
|
// data.organization_id = organization_id;
|
|
36
36
|
|
|
37
37
|
// if (!data.object[0]._id)
|
|
38
|
-
// data.object[0]._id = Crud.ObjectId();
|
|
38
|
+
// data.object[0]._id = Crud.ObjectId().toString();
|
|
39
39
|
|
|
40
40
|
// let user = await Crud.send(data)
|
|
41
41
|
// Elements.setTypeValue(formEl, user)
|
|
@@ -60,8 +60,8 @@ const CoCreateUser = {
|
|
|
60
60
|
if (response && response.object && response.object[0]) {
|
|
61
61
|
// Crud.socket.send({ method: 'signUp', user, userKey })
|
|
62
62
|
|
|
63
|
-
render({
|
|
64
|
-
selector: "[template
|
|
63
|
+
render.render({
|
|
64
|
+
selector: "[template*='signUp']",
|
|
65
65
|
data: {
|
|
66
66
|
type: 'signUp',
|
|
67
67
|
message: 'Succesfully Signed Up',
|
|
@@ -135,13 +135,15 @@ const CoCreateUser = {
|
|
|
135
135
|
else
|
|
136
136
|
message = "The email or password you entered is incorrect";
|
|
137
137
|
|
|
138
|
-
render({
|
|
139
|
-
selector: "[template
|
|
138
|
+
render.render({
|
|
139
|
+
selector: "[template*='signIn']",
|
|
140
140
|
data: {
|
|
141
141
|
type: 'signIn',
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
signIn: {
|
|
143
|
+
status,
|
|
144
|
+
message,
|
|
145
|
+
success
|
|
146
|
+
}
|
|
145
147
|
}
|
|
146
148
|
});
|
|
147
149
|
},
|
|
@@ -151,8 +153,8 @@ const CoCreateUser = {
|
|
|
151
153
|
localStorage.removeItem("user_id");
|
|
152
154
|
localStorage.removeItem("token");
|
|
153
155
|
|
|
154
|
-
render({
|
|
155
|
-
selector: "[template
|
|
156
|
+
render.render({
|
|
157
|
+
selector: "[template*='signOut']",
|
|
156
158
|
data: {
|
|
157
159
|
type: 'signOut',
|
|
158
160
|
message: 'Succesfully logged out',
|