getOverview remplace Hello World
This commit is contained in:
parent
80170c6734
commit
56559b321b
@ -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],
|
||||
|
||||
@ -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"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user