Loading backend/src/app.module.ts +5 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ import { join } from 'path'; import { Town } from './town/entities/town.entity'; import { TownModule } from './town/town.module'; import { TownTraduction } from './town/entities/town-traduction.entity'; import { AuthModule } from './shared/service/auth.module'; import { APP_GUARD } from '@nestjs/core'; import { AuthGuard } from './auth/admin/auth.guard'; @Module({ imports: [ Loading @@ -38,12 +41,13 @@ import { TownTraduction } from './town/entities/town-traduction.entity'; StateModule, DatabaseSeederModule, TownModule, AuthModule, ServeStaticModule.forRoot({ rootPath: join(__dirname, '..', 'static'), }), ], controllers: [AppController], providers: [AppService, DatabaseSeederModule], providers: [AppService, DatabaseSeederModule, { provide: APP_GUARD, useClass: AuthGuard }], exports: [TypeOrmModule], }) export class AppModule {} Loading
backend/src/app.module.ts +5 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ import { join } from 'path'; import { Town } from './town/entities/town.entity'; import { TownModule } from './town/town.module'; import { TownTraduction } from './town/entities/town-traduction.entity'; import { AuthModule } from './shared/service/auth.module'; import { APP_GUARD } from '@nestjs/core'; import { AuthGuard } from './auth/admin/auth.guard'; @Module({ imports: [ Loading @@ -38,12 +41,13 @@ import { TownTraduction } from './town/entities/town-traduction.entity'; StateModule, DatabaseSeederModule, TownModule, AuthModule, ServeStaticModule.forRoot({ rootPath: join(__dirname, '..', 'static'), }), ], controllers: [AppController], providers: [AppService, DatabaseSeederModule], providers: [AppService, DatabaseSeederModule, { provide: APP_GUARD, useClass: AuthGuard }], exports: [TypeOrmModule], }) export class AppModule {}