summary refs log tree commit diff
path: root/dist/util/MongoBigInt.js
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-16 21:40:58 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-16 21:40:58 +0100
commit20660444fd9a20c192301b62f4ef284c8f507b55 (patch)
tree6dbb2a32f21234874e1f09377dd1295cc6591576 /dist/util/MongoBigInt.js
parent:bug: fix database (diff)
downloadserver-20660444fd9a20c192301b62f4ef284c8f507b55.tar.xz
:bug: fix Mongodb BigInt
Diffstat (limited to 'dist/util/MongoBigInt.js')
-rw-r--r--dist/util/MongoBigInt.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/dist/util/MongoBigInt.js b/dist/util/MongoBigInt.js

index 7dae718e..c026f77a 100644 --- a/dist/util/MongoBigInt.js +++ b/dist/util/MongoBigInt.js
@@ -38,6 +38,8 @@ class LongSchema extends mongoose_1.default.SchemaType { return val; if ("" === val) return null; + if (typeof val === "bigint") + return mongoose_1.default.mongo.Long.fromString(val.toString()); if (val instanceof mongoose_1.default.mongo.Long) return BigInt(val.toString()); if (val instanceof Number || "number" == typeof val)