Spaces:
Runtime error
Runtime error
| import { Module, Global } from '@nestjs/common'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { APP_GUARD } from '@nestjs/core'; | |
| import { ApiKey } from './entities/api-key.entity'; | |
| import { AuthService } from './auth.service'; | |
| import { AuthController } from './auth.controller'; | |
| import { AuthValidateController } from './auth-validate.controller'; | |
| import { ApiKeyGuard } from './guards/api-key.guard'; | |
| import { ProxyAwareThrottlerGuard } from '../../common/security/proxy-aware-throttler.guard'; | |
| () | |
| ({ | |
| imports: [TypeOrmModule.forFeature([ApiKey], 'main')], | |
| controllers: [AuthController, AuthValidateController], | |
| providers: [ | |
| AuthService, | |
| { | |
| provide: APP_GUARD, | |
| useClass: ProxyAwareThrottlerGuard, | |
| }, | |
| { | |
| provide: APP_GUARD, | |
| useClass: ApiKeyGuard, | |
| }, | |
| ], | |
| exports: [AuthService], | |
| }) | |
| export class AuthModule {} | |