kaori 4 лет назад
Родитель
Сommit
14f74cf443

+ 1 - 11
packages/app/src/server/service/activity.ts

@@ -1,14 +1,7 @@
-import {
-  Types,
-} from 'mongoose';
 import Crowi from '../crowi';
 
-
 import { getModelSafely } from '../util/mongoose-utils';
 
-import loggerFactory from '../../utils/logger';
-
-const logger = loggerFactory('growi:service:activity');
 
 class ActivityService {
 
@@ -16,12 +9,9 @@ class ActivityService {
 
   inAppNotificationService!: any;
 
-  activityEvent!: any;
-
   constructor(crowi: Crowi) {
     this.crowi = crowi;
     this.inAppNotificationService = crowi.inAppNotificationService;
-    this.activityEvent = crowi.event('activity');
   }
 
 
@@ -29,7 +19,7 @@ class ActivityService {
      * @param {object} parameters
      * @return {Promise}
      */
-  createByParameters = async function(parameters) {
+  createByParameters = function(parameters) {
     const Activity = getModelSafely('Activity') || require('../models/activity')(this.crowi);
 
     return Activity.create(parameters);

+ 0 - 3
packages/app/src/server/service/comment.ts

@@ -15,14 +15,11 @@ class CommentService {
 
   commentEvent!: any;
 
-  activityEvent!: any;
-
   constructor(crowi: Crowi) {
     this.crowi = crowi;
     this.inAppNotificationService = crowi.inAppNotificationService;
 
     this.commentEvent = crowi.event('comment');
-    this.activityEvent = crowi.event('activity');
 
     // init
     this.initCommentEventListeners();

+ 0 - 3
packages/app/src/server/service/in-app-notification.ts

@@ -20,13 +20,10 @@ export default class InAppNotificationService {
 
   commentEvent!: any;
 
-  activityEvent!: any;
-
 
   constructor(crowi: Crowi) {
     this.crowi = crowi;
     this.socketIoService = crowi.socketIoService;
-    this.activityEvent = crowi.event('activity');
 
     this.getUnreadCountByUser = this.getUnreadCountByUser.bind(this);
   }

+ 0 - 1
packages/app/src/server/service/page.js

@@ -22,7 +22,6 @@ class PageService {
   constructor(crowi) {
     this.crowi = crowi;
     this.pageEvent = crowi.event('page');
-    this.activityEvent = crowi.event('activity');
 
     // init
     this.initPageEvent();