diff --git a/src/app.module.ts b/src/app.module.ts index d42393d..c28a767 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -2,12 +2,10 @@ import { Module } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import { AppController } from './app.controller'; import { AppService } from './app.service'; - import appConfig from './config/app.config'; import databaseConfig from './config/database.config'; import jwtConfig from './config/jwt.config'; import { configValidationSchema } from './config/validation.schema'; -import { AuthModule } from './routes/auth/auth.module'; import { UserModule } from './routes/user/user.module'; import { TypeOrmModule } from '@nestjs/typeorm'; import { AllExceptionsFilter } from './common/filters/all_exceptions.filters'; @@ -43,7 +41,6 @@ import { RolesGuard } from './common/guards/roles.guard'; logging: true, }), }), - AuthModule, UserModule, ], controllers: [AppController], diff --git a/src/app.service.ts b/src/app.service.ts index 927d7cc..361dc2b 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -5,4 +5,58 @@ export class AppService { getHello(): string { return 'Hello World!'; } + + getOverView() { + return { + name: "P'titsPas API", + version: "1.0", + description: "Documentation rapide des endpoints disponibles", + authentication: "JWT Bearer Token requis", + endpoints: [ + { + method: "GET", + path: "/parents", + description: "Liste tous les parents", + roles: ["SUPER_ADMIN", "GESTIONNAIRE"] + }, + { + method: "GET", + path: "/parents/:id", + description: "Récupère un parent par ID utilisateur", + roles: ["SUPER_ADMIN", "GESTIONNAIRE"], + params: ["id (UUID)"] + }, + { + method: "POST", + path: "/parents", + description: "Crée un parent", + roles: ["SUPER_ADMIN", "GESTIONNAIRE"], + body: { + user_id: "UUID", + co_parent_id: "UUID (optionnel)" + } + }, + { + method: "PATCH", + path: "/parents/:id", + description: "Met à jour un parent", + roles: ["SUPER_ADMIN", "GESTIONNAIRE"], + params: ["id (UUID)"], + body: { + user_id: "UUID (optionnel)", + co_parent_id: "UUID (optionnel)" + } + }, + { + method: "DELETE", + path: "/parents/:id", + description: "Supprime un parent", + roles: ["SUPER_ADMIN"], + params: ["id (UUID)"] + } + ], + docs: "/api/docs" + }; + } } +