@jetthai/cuora 1.0.109 → 1.0.111-1

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 CHANGED
@@ -2,6 +2,12 @@
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.111-1](https://github.com/jetthai/cuora-module/compare/v1.0.111...v1.0.111-1) (2022-04-27)
6
+
7
+ ### [1.0.111](https://github.com/jetthai/cuora-module/compare/v1.0.110...v1.0.111) (2022-04-20)
8
+
9
+ ### [1.0.110](https://github.com/jetthai/cuora-module/compare/v1.0.109...v1.0.110) (2022-04-15)
10
+
5
11
  ### [1.0.109](https://github.com/jetthai/cuora-module/compare/v1.0.108...v1.0.109) (2022-04-08)
6
12
 
7
13
  ### [1.0.108](https://github.com/jetthai/cuora-module/compare/v1.0.107...v1.0.108) (2022-04-07)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.109",
3
+ "version": "1.0.111-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/src/api/auth.js CHANGED
@@ -1,8 +1,7 @@
1
1
  export default {
2
- guestLogin: ({ dt }) => ({
2
+ guestLogin: () => ({
3
3
  url: 'guestLogin',
4
4
  method: 'post',
5
- params: { dt },
6
5
  isPublic: true,
7
6
  }),
8
7
  login: ({ username, password, provider, countryCode, phone, email, dt }) => ({
package/src/api/user.js CHANGED
@@ -2,6 +2,8 @@ export const PASSWORD_RESET_INIT = 'otp-verifying'
2
2
  export const PASSWORD_RESET_ALLOW = 'allow-change-password'
3
3
 
4
4
  export default {
5
+ checkDt: () => ({ url: 'checkDt', method: 'get' }),
6
+ updateDt: (data) => ({ url: 'updateDt', method: 'post', params: data }),
5
7
  getUserInfo: () => ({ url: 'self', method: 'get' }),
6
8
  updateUserInfo: (data) => ({ url: 'self', method: 'post', params: data }),
7
9
  changePassword: (data) => ({ url: 'settings/password', method: 'post', params: data }),
@@ -264,18 +264,18 @@ export default function (request) {
264
264
  }),
265
265
  redirectTo3Party: async (context, event) => {
266
266
  const { provider, channel, subchannel } = event.data
267
- const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
267
+ // const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
268
268
  const redirectURL = urljoin(
269
269
  request.config.fullURL,
270
270
  'login?' +
271
- qs.stringify({
272
- provider,
273
- redirectURI: `${window.location.protocol}//${window.location.host}`,
274
- channel: cookies.get('channel') || channel || 'official',
275
- subchannel: cookies.get('subchannel') || subchannel || 'pwa',
276
- dt,
277
- platform: 'pwa',
278
- })
271
+ qs.stringify({
272
+ provider,
273
+ redirectURI: `${window.location.protocol}//${window.location.host}`,
274
+ channel: cookies.get('channel') || channel || 'official',
275
+ subchannel: cookies.get('subchannel') || subchannel || 'pwa',
276
+ // dt,
277
+ platform: 'pwa',
278
+ })
279
279
  )
280
280
  window.location.href = redirectURL
281
281
  },
@@ -287,14 +287,14 @@ export default function (request) {
287
287
  },
288
288
  services: {
289
289
  authenticate: async (context, event) => {
290
- const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
291
- const data = { ...context.loginData, dt }
290
+ // const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
291
+ const data = { ...context.loginData }
292
292
  const { token } = await request.send(auth.login(data))
293
293
  return token
294
294
  },
295
295
  authenticateGuest: async (context, event) => {
296
- const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
297
- const { token } = await request.send(auth.guestLogin({ dt }))
296
+ // const dt = await getDeviceToken({ fpToken, sentry, apiURL: request.config.apiURL })
297
+ const { token } = await request.send(auth.guestLogin())
298
298
  return token
299
299
  },
300
300
  logout: async (context, event) => {