sou 7 лет назад
Родитель
Сommit
7cca060365

+ 5 - 3
lib/models/GlobalNotificationSetting.js

@@ -1,8 +1,10 @@
 const mongoose = require('mongoose');
 const GlobalNotificationSetting = require('./GlobalNotificationSetting/index');
+const GlobalNotificationSettingClass = GlobalNotificationSetting.class;
+const GlobalNotificationSettingSchema = GlobalNotificationSetting.schema;
 
 module.exports = function(crowi) {
-  GlobalNotificationSetting.class.crowi = crowi;
-  GlobalNotificationSetting.schema.loadClass(GlobalNotificationSetting.class);
-  return mongoose.model('GlobalNotificationSetting', GlobalNotificationSetting.schema);
+  GlobalNotificationSettingClass.crowi = crowi;
+  GlobalNotificationSettingSchema.loadClass(GlobalNotificationSettingClass);
+  return mongoose.model('GlobalNotificationSetting', GlobalNotificationSettingSchema);
 };

+ 1 - 0
lib/models/GlobalNotificationSetting/index.js

@@ -106,6 +106,7 @@ const generatePathsToMatch = (originalPath) => {
   });
 };
 
+
 module.exports = {
   class: GlobalNotificationSetting,
   schema: globalNotificationSettingSchema,