2021-11-16 21:14:46 -05:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
|
|
import { User } from 'server/entities/user.entity';
|
|
|
|
import { SessionsController } from '../controllers/sessions.controller';
|
2021-11-20 20:18:58 -05:00
|
|
|
import { UsersController } from 'server/controllers/users.controller';
|
2021-11-16 21:14:46 -05:00
|
|
|
import { UsersService } from '../providers/services/users.service';
|
2021-11-23 16:04:12 -05:00
|
|
|
import { RefreshTokensService } from '../providers/services/refresh_tokens.service';
|
|
|
|
import { RefreshToken } from 'server/entities/refresh_token.entity';
|
|
|
|
import { JwtService } from 'server/providers/services/jwt.service';
|
|
|
|
import { RefreshTokensController } from 'server/controllers/refresh_tokens.controller';
|
2021-12-01 22:18:26 -05:00
|
|
|
import { Role } from 'server/entities/role.entity';
|
|
|
|
import { RolesService } from 'server/providers/services/roles.service';
|
|
|
|
import { UserRole } from 'server/entities/user_role.entity';
|
2021-11-20 20:18:58 -05:00
|
|
|
|
2021-11-16 21:14:46 -05:00
|
|
|
@Module({
|
2021-12-01 22:18:26 -05:00
|
|
|
imports: [TypeOrmModule.forFeature([User, RefreshToken, Role, UserRole])],
|
2021-11-23 16:04:12 -05:00
|
|
|
controllers: [SessionsController, UsersController, RefreshTokensController],
|
2021-12-01 22:18:26 -05:00
|
|
|
providers: [UsersService, RolesService, RefreshTokensService, JwtService],
|
|
|
|
exports: [TypeOrmModule],
|
2021-11-16 21:14:46 -05:00
|
|
|
})
|
|
|
|
export class UsersModule {}
|