mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
feat: add EventEmitterModule to AppModule
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
35149e8a42
commit
77615f0878
2 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||
import { ScheduleModule } from '@nestjs/schedule';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { RouterModule, Routes } from 'nest-router';
|
||||
|
@ -22,6 +23,7 @@ import externalConfig from './config/external-services.config';
|
|||
import hstsConfig from './config/hsts.config';
|
||||
import mediaConfig from './config/media.config';
|
||||
import noteConfig from './config/note.config';
|
||||
import { eventModuleConfig } from './events';
|
||||
import { FrontendConfigModule } from './frontend-config/frontend-config.module';
|
||||
import { FrontendConfigService } from './frontend-config/frontend-config.service';
|
||||
import { GroupsModule } from './groups/groups.module';
|
||||
|
@ -87,6 +89,7 @@ const routes: Routes = [
|
|||
],
|
||||
isGlobal: true,
|
||||
}),
|
||||
EventEmitterModule.forRoot(eventModuleConfig),
|
||||
ScheduleModule.forRoot(),
|
||||
NotesModule,
|
||||
UsersModule,
|
||||
|
|
|
@ -4,6 +4,16 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export const eventModuleConfig = {
|
||||
wildcard: false,
|
||||
delimiter: '.',
|
||||
newListener: false,
|
||||
removeListener: false,
|
||||
maxListeners: 10,
|
||||
verboseMemoryLeak: true,
|
||||
ignoreErrors: false,
|
||||
};
|
||||
|
||||
export enum NoteEvent {
|
||||
PERMISSION_CHANGE = 'note.permission_change',
|
||||
DELETION = 'note.deletion',
|
||||
|
|
Loading…
Reference in a new issue