From 176196bc3570e5b1a6bb0549e15ba443c2ba2c25 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Fri, 2 Dec 2022 20:17:28 +0100 Subject: [PATCH] refactor: remove providers and controllers from app module --- backend/src/app.module.ts | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index dcfefeb7..0d556b1d 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -2,22 +2,16 @@ import { HttpException, HttpStatus, Module } from "@nestjs/common"; import { ScheduleModule } from "@nestjs/schedule"; import { AuthModule } from "./auth/auth.module"; -import { JobsService } from "./jobs/jobs.service"; -import { APP_GUARD } from "@nestjs/core"; import { MulterModule } from "@nestjs/platform-express"; -import { ThrottlerGuard, ThrottlerModule } from "@nestjs/throttler"; +import { ThrottlerModule } from "@nestjs/throttler"; import { Request } from "express"; import { ConfigModule } from "./config/config.module"; import { ConfigService } from "./config/config.service"; import { EmailModule } from "./email/email.module"; -import { FileController } from "./file/file.controller"; import { FileModule } from "./file/file.module"; import { PrismaModule } from "./prisma/prisma.module"; -import { PrismaService } from "./prisma/prisma.service"; -import { ShareController } from "./share/share.controller"; import { ShareModule } from "./share/share.module"; -import { UserController } from "./user/user.controller"; @Module({ imports: [ @@ -51,22 +45,5 @@ import { UserController } from "./user/user.controller"; }), ScheduleModule.forRoot(), ], - providers: [ - ConfigService, - PrismaService, - JobsService, - { - provide: "CONFIG_VARIABLES", - useFactory: async (prisma: PrismaService) => { - return await prisma.config.findMany(); - }, - inject: [PrismaService], - }, - { - provide: APP_GUARD, - useClass: ThrottlerGuard, - }, - ], - controllers: [UserController, ShareController, FileController], }) export class AppModule {}