@jetthai/cuora 1.0.170 → 1.0.171

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.171](https://github.com/jetthai/cuora-module/compare/v1.0.170...v1.0.171) (2022-09-21)
6
+
5
7
  ### [1.0.170](https://github.com/jetthai/cuora-module/compare/v1.0.169...v1.0.170) (2022-09-19)
6
8
 
7
9
  ### [1.0.169](https://github.com/jetthai/cuora-module/compare/v1.0.168...v1.0.169) (2022-09-19)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.170",
3
+ "version": "1.0.171",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/game.js CHANGED
@@ -73,4 +73,6 @@ export default {
73
73
  method: 'get',
74
74
  params: { timestamp },
75
75
  }),
76
+ addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
77
+ removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
76
78
  }
@@ -307,7 +307,7 @@ export default function (request) {
307
307
  },
308
308
  addFavorite: async (context, event) => {
309
309
  try {
310
- await request.send(api.addFavoriteGame(event.data.gameCode))
310
+ await request.send(api.addListFavorite(event.data.gameCode))
311
311
  return event.data
312
312
  } catch (error) {
313
313
  throw event.data
@@ -315,7 +315,7 @@ export default function (request) {
315
315
  },
316
316
  removeFavorite: async (context, event) => {
317
317
  try {
318
- await request.send(api.removeFavoriteGame(event.data.gameCode))
318
+ await request.send(api.removeListFavorite(event.data.gameCode))
319
319
  return event.data
320
320
  } catch (error) {
321
321
  throw event.data