@jetthai/cuora 1.1.416 → 1.1.418
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 +8 -0
- package/package.json +1 -1
- package/src/request/request.js +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.1.418](https://github.com/jetthai/cuora-module/compare/v1.1.417...v1.1.418) (2026-03-06)
|
|
6
|
+
|
|
7
|
+
### [1.1.417](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.417) (2026-03-06)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- handle query string in \_convertUrlToKebabCase to avoid incorrect conversion ([3dc8596](https://github.com/jetthai/cuora-module/commit/3dc8596af4855c9af6ff05475fd9422bc24c4ac3))
|
|
12
|
+
|
|
5
13
|
### [1.1.416](https://github.com/jetthai/cuora-module/compare/v1.1.414...v1.1.416) (2026-03-05)
|
|
6
14
|
|
|
7
15
|
### [1.1.414](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.414) (2026-03-05)
|
package/package.json
CHANGED
package/src/request/request.js
CHANGED
|
@@ -321,6 +321,7 @@ export default class Request {
|
|
|
321
321
|
|
|
322
322
|
// 調整API路徑與名稱
|
|
323
323
|
_convertUrlToKebabCase(url) {
|
|
324
|
+
const [path, queryString] = url.split('?')
|
|
324
325
|
const specifyingPath = {
|
|
325
326
|
'all-activities/list': 'activities/all-activities-list',
|
|
326
327
|
friends: 'activities/friends',
|
|
@@ -342,13 +343,9 @@ export default class Request {
|
|
|
342
343
|
'activities/exchange/diamond/max-amount': 'activities/diamond/exchange/max-amount',
|
|
343
344
|
'activities/exchange/diamond/settle': 'activities/diamond/exchange/settle',
|
|
344
345
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
} else {
|
|
349
|
-
// 將API_URL的命名規則由駝峰調整為短橫線(-)
|
|
350
|
-
return url.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
|
|
351
|
-
}
|
|
346
|
+
// 和原有路徑不同有另外改路徑
|
|
347
|
+
const convertedPath = specifyingPath[path] ? specifyingPath[path] : path.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
|
|
348
|
+
return queryString ? `${convertedPath}?${queryString}` : convertedPath
|
|
352
349
|
}
|
|
353
350
|
|
|
354
351
|
_checkToken(req) {
|