@anteros/core 0.0.17 → 0.0.18

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/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  import { define } from "./lib/define";
4
4
  import { bootApp } from "./server/boot";
5
5
  import { useRest } from "./database/rest";
6
+ import { AppError } from "./lib/error";
6
7
  import * as v from "joi";
7
8
  import utils from "./utils";
8
9
  import * as crypto from "./utils/crypto";
@@ -25,6 +26,7 @@ export {
25
26
  define,
26
27
  app,
27
28
  useRest,
29
+ AppError,
28
30
  v,
29
31
  utils,
30
32
  cache,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anteros/core",
3
3
  "module": "index.ts",
4
- "version": "0.0.17",
4
+ "version": "0.0.18",
5
5
  "type": "module",
6
6
  "description": "Anteros Core",
7
7
  "private": false,
package/utils/func.ts CHANGED
@@ -530,7 +530,7 @@ async function buildInput<T>(data: any | any[], options?: FormatInputOptions): P
530
530
 
531
531
  /* Set Default Value For Insert */
532
532
  if (options?.action?.match(/(insert)/)) {
533
- if (Object.hasOwn(f, 'defaultValue') && !dataValue) {
533
+ if (Object.hasOwn(f, 'defaultValue') && (dataValue === undefined || dataValue === null)) {
534
534
  data[fieldName] = f.defaultValue
535
535
  }
536
536
  }