@cocreate/users 1.21.1 → 1.21.2
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 +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.21.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.21.1...v1.21.2) (2023-05-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* renamed signInRequest to signIn ([d6aa96b](https://github.com/CoCreate-app/CoCreate-users/commit/d6aa96b3ea705e974c8b20e38fdf3f6d478d5a4a))
|
|
7
|
+
|
|
1
8
|
## [1.21.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.21.0...v1.21.1) (2023-05-10)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -19,7 +19,7 @@ const CoCreateUser = {
|
|
|
19
19
|
crud.listen('updateUserStatus', (data) => self.updateUserStatus(data));
|
|
20
20
|
},
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
signIn: function(btn) {
|
|
23
23
|
let form = btn.closest('form');
|
|
24
24
|
let collection = form.getAttribute('collection');
|
|
25
25
|
let query = [];
|
|
@@ -45,11 +45,11 @@ const CoCreateUser = {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const socket = crud.socket.getSockets()
|
|
48
|
-
if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine || crud.socket.
|
|
48
|
+
if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine || crud.socket.serverOrganization == false) {
|
|
49
49
|
crud.updateDocument(request).then((response) => {
|
|
50
50
|
response['success'] = false
|
|
51
51
|
response['status'] = "signIn failed"
|
|
52
|
-
if (response.document) {
|
|
52
|
+
if (response.document && response.document[0]) {
|
|
53
53
|
response['success'] = true
|
|
54
54
|
response['status'] = "success"
|
|
55
55
|
this.signInResponse(response)
|
|
@@ -60,7 +60,7 @@ const CoCreateUser = {
|
|
|
60
60
|
} else {
|
|
61
61
|
request.broadcastBrowser = false
|
|
62
62
|
crud.socket.send('signIn', request).then((response) => {
|
|
63
|
-
this.signInResponse(
|
|
63
|
+
this.signInResponse(response)
|
|
64
64
|
})
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -258,7 +258,7 @@ action.init({
|
|
|
258
258
|
name: "signIn",
|
|
259
259
|
endEvent: "signIn",
|
|
260
260
|
callback: (btn, data) => {
|
|
261
|
-
CoCreateUser.
|
|
261
|
+
CoCreateUser.signIn(btn, data);
|
|
262
262
|
},
|
|
263
263
|
});
|
|
264
264
|
|