diff --git a/backend/src/app.controller.ts b/backend/src/app.controller.ts index 8c6c336..a23e708 100644 --- a/backend/src/app.controller.ts +++ b/backend/src/app.controller.ts @@ -1,15 +1,13 @@ import { Controller, Get, Session, UseGuards } from '@nestjs/common'; -import { AppService } from './app.service'; -import { AuthGuard } from './auth.guard'; +import { AuthGuard } from './auth/guards/auth.guard'; import { SessionContainer } from "supertokens-node/recipe/session"; @Controller() export class AppController { - constructor(private readonly appService: AppService) {} @Get() getHello(): string { - return this.appService.getHello(); + return "API"; } @Get('test') diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index a28b8ff..6a04ca8 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -1,6 +1,5 @@ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; -import { AppService } from './app.service'; import { AuthModule } from './auth/auth.module'; import { ConfigModule } from '@nestjs/config'; @@ -20,6 +19,6 @@ import { ConfigModule } from '@nestjs/config'; }), ], controllers: [AppController], - providers: [AppService], + providers: [], }) export class AppModule {} diff --git a/backend/src/app.service.ts b/backend/src/app.service.ts deleted file mode 100644 index 927d7cc..0000000 --- a/backend/src/app.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@nestjs/common'; - -@Injectable() -export class AppService { - getHello(): string { - return 'Hello World!'; - } -} diff --git a/backend/src/auth/auth.module.ts b/backend/src/auth/auth.module.ts index 9384076..ebfdb5f 100644 --- a/backend/src/auth/auth.module.ts +++ b/backend/src/auth/auth.module.ts @@ -4,8 +4,8 @@ import { Module, NestModule, } from '@nestjs/common'; -import { AuthMiddleware } from './auth.middleware'; -import { AuthModuleConfig, ConfigInjectionToken } from './config.interface'; +import { AuthMiddleware } from './middlewares/auth.middleware'; +import { AuthModuleConfig, ConfigInjectionToken } from './interfaces/config.interface'; import { SupertokensService } from './supertokens/supertokens.service'; @Module({ diff --git a/backend/src/auth/session.decorator.ts b/backend/src/auth/decorators/session.decorator.ts similarity index 100% rename from backend/src/auth/session.decorator.ts rename to backend/src/auth/decorators/session.decorator.ts diff --git a/backend/src/auth/auth.filter.ts b/backend/src/auth/filters/auth.filter.ts similarity index 100% rename from backend/src/auth/auth.filter.ts rename to backend/src/auth/filters/auth.filter.ts diff --git a/backend/src/auth.guard.ts b/backend/src/auth/guards/auth.guard.ts similarity index 100% rename from backend/src/auth.guard.ts rename to backend/src/auth/guards/auth.guard.ts diff --git a/backend/src/auth/config.interface.ts b/backend/src/auth/interfaces/config.interface.ts similarity index 100% rename from backend/src/auth/config.interface.ts rename to backend/src/auth/interfaces/config.interface.ts diff --git a/backend/src/auth/auth.middleware.ts b/backend/src/auth/middlewares/auth.middleware.ts similarity index 100% rename from backend/src/auth/auth.middleware.ts rename to backend/src/auth/middlewares/auth.middleware.ts diff --git a/backend/src/auth/supertokens/supertokens.service.ts b/backend/src/auth/supertokens/supertokens.service.ts index bb8e2dc..c4e315a 100644 --- a/backend/src/auth/supertokens/supertokens.service.ts +++ b/backend/src/auth/supertokens/supertokens.service.ts @@ -1,5 +1,5 @@ import { Inject, Injectable } from '@nestjs/common'; -import { AuthModuleConfig, ConfigInjectionToken } from '../config.interface'; +import { AuthModuleConfig, ConfigInjectionToken } from '../interfaces/config.interface'; import supertokens from 'supertokens-node'; import ThirdPartyEmailPassword from 'supertokens-node/recipe/thirdpartyemailpassword'; import EmailPassword from 'supertokens-node/recipe/emailpassword'; diff --git a/backend/src/main.ts b/backend/src/main.ts index ae0dd51..7275f42 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -1,7 +1,7 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import supertokens from 'supertokens-node'; -import { SupertokensExceptionFilter } from './auth/auth.filter'; +import { SupertokensExceptionFilter } from './auth/filters/auth.filter'; async function bootstrap() { const app = await NestFactory.create(AppModule);