kb-server 0.0.4 → 0.0.5

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.
@@ -12,7 +12,7 @@ function createAPI(ParamsClass, execution) {
12
12
  // 校验参数
13
13
  const paramsToCheck = params instanceof ParamsClass
14
14
  ? params
15
- : (0, class_transformer_1.plainToClass)(ParamsClass, params);
15
+ : (0, class_transformer_1.plainToInstance)(ParamsClass, params);
16
16
  const errors = await (0, class_validator_1.validate)(paramsToCheck || {});
17
17
  if (errors?.length) {
18
18
  const errorMessages = errors.flatMap((error) => getMessage(error));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kb-server",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A fast server for Node.JS,made by express.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {