@jetthai/cuora 1.0.8 → 1.0.9

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,8 @@
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.9](https://github.com/jetthai/cuora-module/compare/v1.0.8...v1.0.9) (2021-08-11)
6
+
5
7
  ### [1.0.8](https://github.com/jetthai/cuora-module/compare/v1.0.7...v1.0.8) (2021-08-10)
6
8
 
7
9
  ### [1.0.7](https://github.com/jetthai/cuora-module/compare/v1.0.6...v1.0.7) (2021-08-10)
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # cuora
2
+
3
+ > Intergrate API and Store for game.
4
+
5
+ ## Installation
6
+
7
+ Add @jetthai/cuora dependency to your project:
8
+
9
+ ```bash
10
+ npm install --save @jetthai/cuora
11
+ ```
package/index.js CHANGED
@@ -6,7 +6,7 @@ export default function (moduleOptions) {
6
6
  this.addPlugin({
7
7
  src: path.resolve(__dirname, './plugin/job/network.js'),
8
8
  options,
9
- mode: 'client'
9
+ mode: 'client',
10
10
  })
11
11
 
12
12
  this.addPlugin({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/core.js CHANGED
@@ -437,11 +437,11 @@ function createStore({ $request }) {
437
437
  },
438
438
  async logout({ state, commit, getters, dispatch, rootGetters }) {
439
439
  try {
440
- // commit(`setModal`, null)
441
440
  await $request.send(api.logout())
442
- dispatch('detachToken')
443
441
  } catch (err) {
444
- console.log('[ERR] Logout Fail')
442
+ console.log('[ERR] Logout Fail', err)
443
+ } finally {
444
+ dispatch('detachToken')
445
445
  }
446
446
  },
447
447
  async fetchSiteConfig({ state, commit, getters, dispatch, rootGetters }) {
package/plugin/game.js CHANGED
@@ -11,7 +11,7 @@ const api = {
11
11
  logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
12
12
  }
13
13
 
14
- function createStore({$request}) {
14
+ function createStore({ $request }) {
15
15
  return {
16
16
  namespaced: true,
17
17
  state: () => ({
@@ -409,7 +409,7 @@ function createStore({$request}) {
409
409
 
410
410
  export default (ctx, inject) => {
411
411
  const { store, $request } = ctx
412
- store.registerModule('game', createStore({$request}))
412
+ store.registerModule('game', createStore({ $request }))
413
413
  }
414
414
 
415
415
  function extractInfoChangedGames(oldStatus, newStatus) {