@jetthai/cuora 1.0.17 → 1.0.19

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,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.19](https://github.com/jetthai/cuora-module/compare/v1.0.18...v1.0.19) (2021-08-20)
6
+
7
+ ### [1.0.18](https://github.com/jetthai/cuora-module/compare/v1.0.17...v1.0.18) (2021-08-20)
8
+
5
9
  ### [1.0.17](https://github.com/jetthai/cuora-module/compare/v1.0.16...v1.0.17) (2021-08-19)
6
10
 
7
11
  ### [1.0.16](https://github.com/jetthai/cuora-module/compare/v1.0.15...v1.0.16) (2021-08-17)
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "release": "standard-version",
9
- "push": "git push --follow-tags origin master && npm publish"
8
+ "release": "standard-version && git push --follow-tags origin master && npm publish"
10
9
  },
11
10
  "repository": {
12
11
  "type": "git",
@@ -25,6 +25,11 @@ const api = {
25
25
  params: { achievementNo, appSecret },
26
26
  }),
27
27
  getAchievementsIssued: () => ({ url: 'activities/achievements/issue', method: 'get' }),
28
+ postPromoCode: (promoCode) => ({
29
+ url: 'activities/promo',
30
+ method: 'post',
31
+ params: {promoCode}
32
+ })
28
33
  }
29
34
 
30
35
  const clientSecret = process.env.CLIENT_SECRET
@@ -270,6 +275,10 @@ function createStore({$request}) {
270
275
  const { data } = await $request.send(api.getAchievementsProgress({ achievementNo, appSecret: clientSecret }))
271
276
  return data
272
277
  },
278
+ async postPromoCode({}, promoCode) {
279
+ const { data } = await $request.send(api.postPromoCode(promoCode))
280
+ return data
281
+ }
273
282
  },
274
283
  }
275
284
  }
package/plugin/game.js CHANGED
@@ -373,7 +373,7 @@ function createStore({ $request }) {
373
373
  return $request.send(api.logoutGame({ uid_site, provider_id: provider }))
374
374
  },
375
375
  // fnc
376
- async connectGame({}, game) {
376
+ async connectGame({}, {game, lang = 'en_US'}) {
377
377
  const {provider, game_id, game_type, mapping_id} = game
378
378
  const params = {
379
379
  provider_id: provider,
@@ -384,8 +384,7 @@ function createStore({ $request }) {
384
384
  // todo - set false temporarily
385
385
  // is_mobile: rootGetters['core/isMobileDevice'],
386
386
  is_mobile: false,
387
- // todo - set en_US temporarily
388
- lang: 'en_US',
387
+ lang: lang.replace('-', '_'),
389
388
  // todo - set temporarily
390
389
  // return_url: returnProviders.includes(game.provider) ? `${window.location.origin}/return` : window.location.href, // For providers to return.
391
390
  return_url: window.location.href