@klapeks/micro-db-utils 0.0.2 → 0.0.3
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.
|
@@ -85,8 +85,9 @@ var MongoDBConnection = /** @class */ (function () {
|
|
|
85
85
|
MongoDBConnection.createCounter = function (name) {
|
|
86
86
|
var _this = this;
|
|
87
87
|
if (name === void 0) { name = 'Counter'; }
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
if (!mongooseModule)
|
|
89
|
+
throw "No mongoose module";
|
|
90
|
+
var _CounterSchema = new mongooseModule.Schema({
|
|
90
91
|
model: { type: String, required: true, unique: true },
|
|
91
92
|
counter: { type: Number, default: 0 }
|
|
92
93
|
}, {
|
|
@@ -174,7 +175,6 @@ function _createDefaultMongoSchemas() {
|
|
|
174
175
|
if (!mongooseModule)
|
|
175
176
|
return {};
|
|
176
177
|
return {
|
|
177
|
-
// @ts-ignore
|
|
178
178
|
MongoGeoPoint: new mongooseModule.Schema({
|
|
179
179
|
type: {
|
|
180
180
|
type: String,
|