Commit 7418e32e authored by Diego Iván's avatar Diego Iván
Browse files

agregando auth guard a todas las rutas

parent 6d8db2c7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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: [
@@ -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 {}