befly 3.9.39 → 3.9.40
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/hooks/validator.ts +1 -1
- package/package.json +2 -2
package/hooks/validator.ts
CHANGED
|
@@ -22,7 +22,7 @@ const hook: Hook = {
|
|
|
22
22
|
// 应用字段默认值
|
|
23
23
|
for (const [field, fieldDef] of Object.entries(ctx.api.fields)) {
|
|
24
24
|
// 字段未传值且定义了默认值时,应用默认值
|
|
25
|
-
if (ctx.body[field] === undefined && (fieldDef as any)?.default !== undefined) {
|
|
25
|
+
if (ctx.body[field] === undefined && (fieldDef as any)?.default !== undefined && (fieldDef as any)?.default !== null) {
|
|
26
26
|
ctx.body[field] = (fieldDef as any).default;
|
|
27
27
|
}
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
|
|
6
6
|
"keywords": [
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "0ba53d2bbdc6a7f2659ef60256cda7302fe585b0"
|
|
83
83
|
}
|