Spaces:
Sleeping
Sleeping
Download src/modules/auth/auth.module.ts from jinksQspider/openWa: direct link, hf CLI and curl.
- Browser
- Download file 832 Bytes
-
https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/auth/auth.module.ts
- Command line
-
hf download hf://spaces/jinksQspider/openWa/src/modules/auth/auth.module.ts
-
curl -L -o auth.module.ts https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/auth/auth.module.ts
832 Bytes
| import { Module, Global } from '@nestjs/common'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { APP_GUARD } from '@nestjs/core'; | |
| import { ThrottlerGuard } from '@nestjs/throttler'; | |
| 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'; | |
| () | |
| ({ | |
| imports: [TypeOrmModule.forFeature([ApiKey], 'main')], | |
| controllers: [AuthController, AuthValidateController], | |
| providers: [ | |
| AuthService, | |
| { | |
| provide: APP_GUARD, | |
| useClass: ThrottlerGuard, | |
| }, | |
| { | |
| provide: APP_GUARD, | |
| useClass: ApiKeyGuard, | |
| }, | |
| ], | |
| exports: [AuthService], | |
| }) | |
| export class AuthModule {} | |