@jetthai/cuora 1.0.141 → 1.0.143
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 +4 -0
- package/package.json +1 -1
- package/src/machine/auth.js +3 -3
- package/src/machine/user_sign_up.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.143](https://github.com/jetthai/cuora-module/compare/v1.0.141...v1.0.143) (2022-07-14)
|
|
6
|
+
|
|
7
|
+
### [1.0.142](https://github.com/jetthai/cuora-module/compare/v1.0.141...v1.0.142) (2022-07-14)
|
|
8
|
+
|
|
5
9
|
### [1.0.141](https://github.com/jetthai/cuora-module/compare/v1.0.140-1...v1.0.141) (2022-07-05)
|
|
6
10
|
|
|
7
11
|
### [1.0.140-1](https://github.com/jetthai/cuora-module/compare/v1.0.140...v1.0.140-1) (2022-07-04)
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
|
@@ -6,7 +6,7 @@ import auth from '../api/auth'
|
|
|
6
6
|
import user from '../api/user'
|
|
7
7
|
|
|
8
8
|
export default function (request) {
|
|
9
|
-
const { clientId, sentry } = request.config
|
|
9
|
+
const { clientId, sentry, defaultChannel, defaultSubchannel } = request.config
|
|
10
10
|
const tokenKey = `cuora_${clientId}`
|
|
11
11
|
const userKey = `cuora_tempuser`
|
|
12
12
|
const accountPhoneKey = 'account_phone'
|
|
@@ -291,8 +291,8 @@ export default function (request) {
|
|
|
291
291
|
qs.stringify({
|
|
292
292
|
provider,
|
|
293
293
|
redirectURI: `${window.location.protocol}//${window.location.host}`,
|
|
294
|
-
channel: cookies.get('channel') || channel || 'official',
|
|
295
|
-
subchannel: cookies.get('subchannel') || subchannel || 'pwa',
|
|
294
|
+
channel: cookies.get('channel') || channel || defaultChannel || 'official',
|
|
295
|
+
subchannel: cookies.get('subchannel') || subchannel || defaultSubchannel || 'pwa',
|
|
296
296
|
// dt,
|
|
297
297
|
platform: 'pwa',
|
|
298
298
|
})
|
|
@@ -5,7 +5,7 @@ import { getDeviceToken } from '../util/deviceToken'
|
|
|
5
5
|
const cookies = new Cookies()
|
|
6
6
|
|
|
7
7
|
export default function (request) {
|
|
8
|
-
const { fpToken, sentry } = request.config
|
|
8
|
+
const { fpToken, sentry, defaultChannel, defaultSubchannel } = request.config
|
|
9
9
|
return createMachine(
|
|
10
10
|
{
|
|
11
11
|
id: 'user_sign_up',
|
|
@@ -86,8 +86,8 @@ export default function (request) {
|
|
|
86
86
|
return await request.send(
|
|
87
87
|
auth.register({
|
|
88
88
|
...signUpData,
|
|
89
|
-
channel: cookies.get('channel') || channel,
|
|
90
|
-
subchannel: cookies.get('subchannel') || subchannel,
|
|
89
|
+
channel: cookies.get('channel') || defaultChannel || channel,
|
|
90
|
+
subchannel: cookies.get('subchannel') || defaultSubchannel || subchannel,
|
|
91
91
|
dt,
|
|
92
92
|
reCaptchaToken: context.reCaptchaToken
|
|
93
93
|
})
|