From a22262b6603a2dd3dd7fa2cd40e08602a746758e Mon Sep 17 00:00:00 2001 From: GeunH Date: Fri, 17 Nov 2023 11:59:10 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20auth=EB=AA=A8=EB=93=88=EA=B3=BC?= =?UTF-8?q?=20user=EB=AA=A8=EB=93=88=EA=B0=84=20export,=20import=20?= =?UTF-8?q?=EC=88=9C=ED=99=98=20=EC=9D=98=EC=A1=B4=EC=84=B1=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=20#35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - forwardRef를 추가하여 잠재적 오류 가능성 해결. --- be/src/auth/auth.module.ts | 6 +++--- be/src/user/user.module.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/be/src/auth/auth.module.ts b/be/src/auth/auth.module.ts index 1259572c..23fc9f59 100644 --- a/be/src/auth/auth.module.ts +++ b/be/src/auth/auth.module.ts @@ -1,4 +1,4 @@ -import { Module } from "@nestjs/common"; +import { Module, forwardRef } from "@nestjs/common"; import { AuthController } from "./auth.controller"; import { AuthService } from "./auth.service"; import { JwtModule } from "@nestjs/jwt"; @@ -15,10 +15,10 @@ import { JwtStrategy } from "./strategy/jwt.strategy"; expiresIn: 3600, }, }), - UserModule, + forwardRef(() => UserModule), ], controllers: [AuthController], providers: [AuthService, JwtStrategy], exports: [PassportModule], }) -export class AuthModule {} +export class AuthModule { } diff --git a/be/src/user/user.module.ts b/be/src/user/user.module.ts index 2c3ad530..3dbc2a3d 100644 --- a/be/src/user/user.module.ts +++ b/be/src/user/user.module.ts @@ -2,10 +2,12 @@ import { Module } from "@nestjs/common"; import { UserController } from "./user.controller"; import { UserService } from "./user.service"; import { UserRepository } from "./user.repository"; +import { AuthModule } from "src/auth/auth.module"; @Module({ + imports: [AuthModule], controllers: [UserController], providers: [UserService, UserRepository], exports: [UserRepository], }) -export class UserModule {} +export class UserModule { }