@jetthai/cuora 1.1.355-apiv2-1 → 1.1.355-apiv2-2
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/src/request/request.js +3 -2
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.1.355-apiv2-2](https://github.com/jetthai/cuora-module/compare/v1.1.355-apiv2-1...v1.1.355-apiv2-2) (2025-05-07)
|
|
6
|
+
|
|
5
7
|
### [1.1.355-apiv2-1](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-apiv2-1) (2025-05-05)
|
|
6
8
|
|
|
7
9
|
### [1.1.355](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.355) (2025-04-22)
|
package/package.json
CHANGED
package/src/request/request.js
CHANGED
|
@@ -135,8 +135,9 @@ export default class Request {
|
|
|
135
135
|
_createConfig(req, cancelToken) {
|
|
136
136
|
const { method, url, params, isPublic, isFormData, headers } = req
|
|
137
137
|
let fullURL = this.config.fullURL
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
// 有些API會將參數(/?)直接帶在URL上,所以要將參數排除
|
|
139
|
+
if (supportVersion2List.includes(url.split('?')[0])) {
|
|
140
|
+
console.log('*[DEV_ONLY]有支援V2的API:', url.split('?')[0])
|
|
140
141
|
fullURL = fullURL.replace('/v1/', '/v2/')
|
|
141
142
|
}
|
|
142
143
|
if (isFormData) {
|