LocChat/server/modules/users.module.ts
Joseph Ditton 84b45cd6b1 adds roles
2021-12-01 20:18:26 -07:00

22 lines
1.1 KiB
TypeScript

import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from 'server/entities/user.entity';
import { SessionsController } from '../controllers/sessions.controller';
import { UsersController } from 'server/controllers/users.controller';
import { UsersService } from '../providers/services/users.service';
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';
import { Role } from 'server/entities/role.entity';
import { RolesService } from 'server/providers/services/roles.service';
import { UserRole } from 'server/entities/user_role.entity';
@Module({
imports: [TypeOrmModule.forFeature([User, RefreshToken, Role, UserRole])],
controllers: [SessionsController, UsersController, RefreshTokensController],
providers: [UsersService, RolesService, RefreshTokensService, JwtService],
exports: [TypeOrmModule],
})
export class UsersModule {}