|
@@ -1,7 +1,6 @@
|
|
|
const debug = require('debug')('growi:models:GlobalNotificationSetting');
|
|
const debug = require('debug')('growi:models:GlobalNotificationSetting');
|
|
|
const mongoose = require('mongoose');
|
|
const mongoose = require('mongoose');
|
|
|
-const notificationSchema = require('./GlobalNotificationSetting/GlobalNotificationSettingParentSchema');
|
|
|
|
|
-const GlobalNotificationSettingClass = require('./GlobalNotificationSetting/GlobalNotificationSettingClass');
|
|
|
|
|
|
|
+const GlobalNotificationSetting = require('./GlobalNotificationSetting/index');
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* create child schemas inherited from parentSchema
|
|
* create child schemas inherited from parentSchema
|
|
@@ -20,7 +19,7 @@ const createChildSchemas = (parentSchema, modelName, discriminatorKey) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
module.exports = function(crowi) {
|
|
module.exports = function(crowi) {
|
|
|
- GlobalNotificationSettingClass.crowi = crowi;
|
|
|
|
|
- notificationSchema.loadClass(GlobalNotificationSettingClass);
|
|
|
|
|
- return createChildSchemas(notificationSchema, 'GlobalNotificationSetting', 'type');
|
|
|
|
|
|
|
+ GlobalNotificationSetting.class.crowi = crowi;
|
|
|
|
|
+ GlobalNotificationSetting.schema.loadClass(GlobalNotificationSetting.class);
|
|
|
|
|
+ return createChildSchemas(GlobalNotificationSetting.schema, 'GlobalNotificationSetting', 'type');
|
|
|
};
|
|
};
|