|
@@ -18,6 +18,7 @@ import AclService from '../service/acl';
|
|
|
import AttachmentService from '../service/attachment';
|
|
import AttachmentService from '../service/attachment';
|
|
|
import { SlackIntegrationService } from '../service/slack-integration';
|
|
import { SlackIntegrationService } from '../service/slack-integration';
|
|
|
import { UserNotificationService } from '../service/user-notification';
|
|
import { UserNotificationService } from '../service/user-notification';
|
|
|
|
|
+import Actiity from '../models/activity';
|
|
|
|
|
|
|
|
const logger = loggerFactory('growi:crowi');
|
|
const logger = loggerFactory('growi:crowi');
|
|
|
const httpErrorHandler = require('../middlewares/http-error-handler');
|
|
const httpErrorHandler = require('../middlewares/http-error-handler');
|
|
@@ -300,7 +301,15 @@ Crowi.prototype.setupSocketIoService = async function() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
Crowi.prototype.setupModels = async function() {
|
|
Crowi.prototype.setupModels = async function() {
|
|
|
- Object.keys(models).forEach((key) => {
|
|
|
|
|
|
|
+ let allModels = {};
|
|
|
|
|
+
|
|
|
|
|
+ // include models that dependent on crowi
|
|
|
|
|
+ allModels = models;
|
|
|
|
|
+
|
|
|
|
|
+ // include models that independent from crowi
|
|
|
|
|
+ allModels.Activity = Actiity;
|
|
|
|
|
+
|
|
|
|
|
+ Object.keys(allModels).forEach((key) => {
|
|
|
return this.model(key, models[key](this));
|
|
return this.model(key, models[key](this));
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|