Skip to content
Snippets Groups Projects
Commit 2e712a35 authored by L4168's avatar L4168
Browse files

added global guard

parent 138e71b5
No related branches found
No related tags found
2 merge requests!59Development to master,!18Join game
import { Module } from '@nestjs/common';
import { APP_FILTER, APP_INTERCEPTOR } from '@nestjs/core';
import { APP_FILTER, APP_INTERCEPTOR, APP_GUARD } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
......@@ -11,6 +11,7 @@ import { LoggingInterceptor } from './shared/logging.interceptor';
import { MapMarkerModule } from './mapmarkers/mapmarkers.module';
import { NotificationModule } from './notifications/notifications.module';
import { GameModule } from './game/game.module';
import { RolesGuard } from './shared/roles.guard';
@Module({
imports: [
......@@ -31,6 +32,10 @@ import { GameModule } from './game/game.module';
provide: APP_INTERCEPTOR,
useClass: LoggingInterceptor,
},
{
provide: APP_GUARD,
useClass: RolesGuard
}
],
})
export class AppModule {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment