Spaces:
Sleeping
Sleeping
Download src/modules/users/users.module.ts from mahrooshishaq/SmartfolioBackend: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/users/users.module.ts
- Command line
-
hf download hf://spaces/mahrooshishaq/SmartfolioBackend/src/modules/users/users.module.ts
-
curl -L -o users.module.ts https://huggingface.co/spaces/mahrooshishaq/SmartfolioBackend/resolve/main/src/modules/users/users.module.ts
1.22 kB
| import { Module } from '@nestjs/common'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { UsersService } from './users.service'; | |
| import { User } from './user.entity'; | |
| import { Campaign } from '../campaigns/entities/campaign.entity'; | |
| import { UsersOperatorController } from './users-operator.controller'; | |
| import { UsersAdminController } from './users-admin.controller'; | |
| import { UsersAdminService } from './users-admin.service'; | |
| import { RateLimitGuard } from '../../common/guards/rate-limit.guard'; | |
| // Two controllers, both narrow on purpose. The operator one exposes four named | |
| // fields; the admin one selects a named column list and is behind RolesGuard. | |
| // Neither returns the User entity whole — the old /users routes did, password | |
| // and token hashes included, and that is the mistake this module exists to | |
| // avoid repeating. Everything else reaches user records through /auth and | |
| // /profile, which scope every read to the authenticated principal. | |
| ({ | |
| imports: [TypeOrmModule.forFeature([User, Campaign])], | |
| controllers: [UsersOperatorController, UsersAdminController], | |
| providers: [UsersService, UsersAdminService, RateLimitGuard], | |
| exports: [UsersService], | |
| }) | |
| export class UsersModule {} | |