yohei0125 3 лет назад
Родитель
Сommit
70c04ce895
2 измененных файлов с 0 добавлено и 27 удалено
  1. 0 9
      packages/app/src/server/crowi/index.js
  2. 0 18
      packages/app/src/server/service/revision.ts

+ 0 - 9
packages/app/src/server/crowi/index.js

@@ -27,7 +27,6 @@ import { InstallerService } from '../service/installer';
 import PageService from '../service/page';
 import PageService from '../service/page';
 import PageGrantService from '../service/page-grant';
 import PageGrantService from '../service/page-grant';
 import PageOperationService from '../service/page-operation';
 import PageOperationService from '../service/page-operation';
-import RevisionService from '../service/revision';
 import SearchService from '../service/search';
 import SearchService from '../service/search';
 import { SlackIntegrationService } from '../service/slack-integration';
 import { SlackIntegrationService } from '../service/slack-integration';
 import { UserNotificationService } from '../service/user-notification';
 import { UserNotificationService } from '../service/user-notification';
@@ -68,7 +67,6 @@ function Crowi() {
   this.exportService = null;
   this.exportService = null;
   this.importService = null;
   this.importService = null;
   this.searchService = null;
   this.searchService = null;
-  this.revisionService = null;
   this.socketIoService = null;
   this.socketIoService = null;
   this.pageService = null;
   this.pageService = null;
   this.syncPageStatusService = null;
   this.syncPageStatusService = null;
@@ -133,7 +131,6 @@ Crowi.prototype.init = async function() {
     this.setupExport(),
     this.setupExport(),
     this.setupImport(),
     this.setupImport(),
     this.setupPageService(),
     this.setupPageService(),
-    this.setupRevisionService(),
     this.setupInAppNotificationService(),
     this.setupInAppNotificationService(),
     this.setupActivityService(),
     this.setupActivityService(),
     this.setupCommentService(),
     this.setupCommentService(),
@@ -698,12 +695,6 @@ Crowi.prototype.setupPageService = async function() {
   }
   }
 };
 };
 
 
-Crowi.prototype.setupRevisionService = async function() {
-  if (this.revisionService == null) {
-    this.revisionService = new RevisionService(this);
-  }
-};
-
 Crowi.prototype.setupInAppNotificationService = async function() {
 Crowi.prototype.setupInAppNotificationService = async function() {
   const InAppNotificationService = require('../service/in-app-notification');
   const InAppNotificationService = require('../service/in-app-notification');
   if (this.inAppNotificationService == null) {
   if (this.inAppNotificationService == null) {

+ 0 - 18
packages/app/src/server/service/revision.ts

@@ -1,18 +0,0 @@
-import { isValidObjectId } from 'mongoose';
-
-class RevisionService {
-
-  crowi: any;
-
-  constructor(crowi) {
-    this.crowi = crowi;
-  }
-
-  async isSpecifiedRevisionExist(revisionId: string): Promise<boolean> {
-    const Revision = this.crowi.model('Revision');
-    return isValidObjectId(revisionId) ? Revision.exists({ _id: revisionId }) : false;
-  }
-
-}
-
-export default RevisionService;