Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix circular dependency

Blue Mouse90294439ae61
diff --git a/backend/apps/community/src/auth/auth.module.ts b/backend/apps/community/src/auth/auth.module.ts
index 18ae84652..5b0af6f9d 100644
--- a/backend/apps/community/src/auth/auth.module.ts
+++ b/backend/apps/community/src/auth/auth.module.ts
@@ -1,4 +1,4 @@
-import { Module } from '@nestjs/common'
+import { forwardRef, Module } from '@nestjs/common'
import { JwtModule } from '@nestjs/jwt'
import { PassportModule } from '@nestjs/passport'
import { AuthController } from './auth.controller'
@@ -12,7 +12,12 @@ import {
import { MailerModule } from '../mailer/mailer.module'
@Module({
- imports: [JwtModule.register({}), PassportModule, UserModule, MailerModule],
+ imports: [
+ JwtModule.register({}),
+ PassportModule,
+ forwardRef(() => UserModule),
+ MailerModule,
+ ],
controllers: [AuthController],
providers: [
AuthService,
diff --git a/backend/apps/community/src/user/user.module.ts b/backend/apps/community/src/user/user.module.ts
index ecbff4f39..a172b5340 100644
--- a/backend/apps/community/src/user/user.module.ts
+++ b/backend/apps/community/src/user/user.module.ts
@@ -1,4 +1,4 @@
-import { Module } from '@nestjs/common'
+import { Module, forwardRef } from '@nestjs/common'
import { UserController } from './user.controller'
import { UserService } from './user.service'
@@ -7,7 +7,7 @@ import { MailerModule } from '../mailer/mailer.module'
import { AuthModule } from '../auth/auth.module'
@Module({
- imports: [AppLoggerModule, MailerModule, AuthModule],
+ imports: [AppLoggerModule, MailerModule, forwardRef(() => AuthModule)],
providers: [UserService],
exports: [UserService],
controllers: [UserController],