mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -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 { Module } from '@nestjs/common';
|
||||||
import { ConfigModule } from '@nestjs/config';
|
import { ConfigModule } from '@nestjs/config';
|
||||||
|
import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||||
import { ScheduleModule } from '@nestjs/schedule';
|
import { ScheduleModule } from '@nestjs/schedule';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { RouterModule, Routes } from 'nest-router';
|
import { RouterModule, Routes } from 'nest-router';
|
||||||
|
@ -22,6 +23,7 @@ import externalConfig from './config/external-services.config';
|
||||||
import hstsConfig from './config/hsts.config';
|
import hstsConfig from './config/hsts.config';
|
||||||
import mediaConfig from './config/media.config';
|
import mediaConfig from './config/media.config';
|
||||||
import noteConfig from './config/note.config';
|
import noteConfig from './config/note.config';
|
||||||
|
import { eventModuleConfig } from './events';
|
||||||
import { FrontendConfigModule } from './frontend-config/frontend-config.module';
|
import { FrontendConfigModule } from './frontend-config/frontend-config.module';
|
||||||
import { FrontendConfigService } from './frontend-config/frontend-config.service';
|
import { FrontendConfigService } from './frontend-config/frontend-config.service';
|
||||||
import { GroupsModule } from './groups/groups.module';
|
import { GroupsModule } from './groups/groups.module';
|
||||||
|
@ -87,6 +89,7 @@ const routes: Routes = [
|
||||||
],
|
],
|
||||||
isGlobal: true,
|
isGlobal: true,
|
||||||
}),
|
}),
|
||||||
|
EventEmitterModule.forRoot(eventModuleConfig),
|
||||||
ScheduleModule.forRoot(),
|
ScheduleModule.forRoot(),
|
||||||
NotesModule,
|
NotesModule,
|
||||||
UsersModule,
|
UsersModule,
|
||||||
|
|
|
@ -4,6 +4,16 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* 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 {
|
export enum NoteEvent {
|
||||||
PERMISSION_CHANGE = 'note.permission_change',
|
PERMISSION_CHANGE = 'note.permission_change',
|
||||||
DELETION = 'note.deletion',
|
DELETION = 'note.deletion',
|
||||||
|
|
Loading…
Reference in a new issue