@jetthai/cuora 1.1.447 → 1.1.448
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 +6 -0
- package/package.json +1 -1
- package/src/request/request.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.448](https://github.com/jetthai/cuora-module/compare/v1.1.447...v1.1.448) (2026-07-17)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **request:** 非 public 請求缺少 token 時提前返回,不再送出後端 ([48a36cb](https://github.com/jetthai/cuora-module/commit/48a36cbfa4df056e21ea39ef31923352885d2308))
|
|
10
|
+
|
|
5
11
|
### [1.1.447](https://github.com/jetthai/cuora-module/compare/v1.1.446...v1.1.447) (2026-07-13)
|
|
6
12
|
|
|
7
13
|
### [1.1.446](https://github.com/jetthai/cuora-module/compare/v1.1.445...v1.1.446) (2026-07-07)
|
package/package.json
CHANGED
package/src/request/request.js
CHANGED
|
@@ -251,9 +251,11 @@ export default class Request {
|
|
|
251
251
|
|
|
252
252
|
async send(req, customToken) {
|
|
253
253
|
try {
|
|
254
|
+
if (!req.isPublic && !this.getToken()) return
|
|
255
|
+
|
|
254
256
|
const cancelToken = customToken || this.source.token
|
|
257
|
+
|
|
255
258
|
// ERR_A103 No token provided 改由後端回傳:不再於送出前自行 throw,
|
|
256
|
-
// 無 token 的非 public 請求一律送後端,由後端判定並回 A103(前台再屏蔽/登出)。
|
|
257
259
|
const requestConfig = this._createConfig(req, cancelToken)
|
|
258
260
|
const configUrls = ['getConfig', 'get-config']
|
|
259
261
|
if (this.isBlocked && !configUrls.includes(requestConfig.url)) {
|