@jetthai/cuora 1.0.10 → 1.0.12

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.12](https://github.com/jetthai/cuora-module/compare/v1.0.11...v1.0.12) (2021-08-16)
6
+
7
+ ### [1.0.11](https://github.com/jetthai/cuora-module/compare/v1.0.10...v1.0.11) (2021-08-13)
8
+
5
9
  ### [1.0.10](https://github.com/jetthai/cuora-module/compare/v1.0.9...v1.0.10) (2021-08-13)
6
10
 
7
11
  ### [1.0.9](https://github.com/jetthai/cuora-module/compare/v1.0.8...v1.0.9) (2021-08-11)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/game.js CHANGED
@@ -281,6 +281,9 @@ function createStore({ $request }) {
281
281
  commit('_setInverseGameMap', rootState.localStorage.gameV2PersistedOption)
282
282
  }
283
283
  },
284
+ async getGameCategory(id) {
285
+ return $request.send(api.getGameCategory({ id }))
286
+ },
284
287
  async fetchGameList({ state, commit, getters, dispatch, rootState, rootGetters }, id) {
285
288
  await dispatch('checkGameListPreset')
286
289
  const currentPath = this.$router.history.current.fullPath
package/plugin/request.js CHANGED
@@ -3,7 +3,7 @@ import Cookies from 'universal-cookie'
3
3
  import urljoin from 'url-join'
4
4
 
5
5
  class CuoraConfig {
6
- constructor({apiURL, apiVersion, clientId, product, version}) {
6
+ constructor({ apiURL, apiVersion, clientId, product, version }) {
7
7
  this._apiURL = apiURL
8
8
  this._apiVersion = apiVersion
9
9
  this._clientId = clientId
@@ -81,6 +81,14 @@ class Cookie {
81
81
  getUser() {
82
82
  return this.cookies.get('cuora_tempuser')
83
83
  }
84
+
85
+ set(name, value, options) {
86
+ this.cookies.set(name, value, options)
87
+ }
88
+
89
+ get(name, options) {
90
+ return this.cookies.get(name, options)
91
+ }
84
92
  }
85
93
 
86
94
  class Request {
@@ -202,7 +210,7 @@ export default (ctx, inject) => {
202
210
  apiVersion: process.env.API_VERSION,
203
211
  clientId: process.env.CLIENT_ID,
204
212
  product: 'pwa',
205
- version: 'v<%= options.version %>'
213
+ version: 'v<%= options.version %>',
206
214
  })
207
215
  const cookie = new Cookie(`cuora_${cuoraConfig.clientId}`)
208
216
  inject('request', new Request($axios, store, cuoraConfig, cookie))