skybase 0.1.104 → 0.1.105
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 +17 -1
- package/lib/middleware/sky-check-param.js +9 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
## [0.1.
|
|
1
|
+
## [0.1.104](https://github.com/kongnet/skybase/compare/v0.1.103...v0.1.104) (2025-12-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## [0.1.103](https://github.com/kongnet/skybase/compare/v0.1.102...v0.1.103) (2025-12-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [0.1.102](https://github.com/kongnet/skybase/compare/v0.1.101...v0.1.102) (2025-12-13)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.1.101](https://github.com/kongnet/skybase/compare/v0.1.95...v0.1.101) (2025-12-13)
|
|
2
17
|
|
|
3
18
|
|
|
4
19
|
### :sparkles:
|
|
5
20
|
|
|
6
21
|
* (koa 版本升级) ([eb043e1](https://github.com/kongnet/skybase/commit/eb043e18851d6946c92de77940a8756dfe89b920))
|
|
22
|
+
* 增加多语言前端自定义错误 ([107bea2](https://github.com/kongnet/skybase/commit/107bea25a2c4edcf6d59b46508f1efadd5d0d70c))
|
|
7
23
|
|
|
8
24
|
|
|
9
25
|
|
|
@@ -140,14 +140,15 @@ module.exports = async (ctx, next) => {
|
|
|
140
140
|
)
|
|
141
141
|
apiCheckLog(apiPath, ctx.checkedData, method, params, ctx)
|
|
142
142
|
if (ctx.checkedData.code >= 400) {
|
|
143
|
-
/*
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
143
|
+
/*
|
|
144
|
+
!有errSimple 看是否配置了语言参数_lang=en 或者 默认default,或者直接返回errSimple.
|
|
145
|
+
!没有 errSimple 返回 ctx.checkedData.msg
|
|
146
|
+
^ errSimple: {
|
|
147
|
+
^ default: 'Parameter error, please check the input parameters',
|
|
148
|
+
^ zh: '参数错误,请检查输入参数'
|
|
149
|
+
^ },
|
|
150
|
+
!或者
|
|
151
|
+
^ errSimple:'err msg'
|
|
151
152
|
*/
|
|
152
153
|
return ctx.throwCode(
|
|
153
154
|
400,
|