@jetthai/cuora 1.0.18 → 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 +2 -0
- package/package.json +1 -1
- package/plugin/activity.js +9 -0
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.19](https://github.com/jetthai/cuora-module/compare/v1.0.18...v1.0.19) (2021-08-20)
|
|
6
|
+
|
|
5
7
|
### [1.0.18](https://github.com/jetthai/cuora-module/compare/v1.0.17...v1.0.18) (2021-08-20)
|
|
6
8
|
|
|
7
9
|
### [1.0.17](https://github.com/jetthai/cuora-module/compare/v1.0.16...v1.0.17) (2021-08-19)
|
package/package.json
CHANGED
package/plugin/activity.js
CHANGED
|
@@ -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
|
}
|