cloud-ide-model-schema 1.1.26 → 1.1.27
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/lib/config/database.d.ts
CHANGED
package/lib/config/database.js
CHANGED
|
@@ -66,5 +66,5 @@ function connectDB() {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
// Event listner for success and error // pending
|
|
69
|
-
var customUUID = function () { return "".concat(process.env.UUID_PREFIX
|
|
69
|
+
var customUUID = function () { return new mongoose.Types.ObjectId("".concat(process.env.UUID_PREFIX).concat((0, cloud_ide_lms_model_1.generateRandomAlphanumericString)(21))); };
|
|
70
70
|
exports.customUUID = customUUID;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CCoreSylog = void 0;
|
|
4
4
|
var mongoose_1 = require("mongoose");
|
|
5
|
+
var database_1 = require("../../config/database");
|
|
5
6
|
/* SCHEMA START */
|
|
6
7
|
var core_system_logs = new mongoose_1.Schema({
|
|
7
8
|
_id: {
|
|
8
9
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
9
|
-
default: function () { return
|
|
10
|
+
default: function () { return (0, database_1.customUUID)(); } // default ObjectId, can be replaced with a custom UUID generator
|
|
10
11
|
},
|
|
11
12
|
sylog_id_user: {
|
|
12
13
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
package/package.json
CHANGED