From 48196c1ed6aa8585613927b12e7f563e4f682fda Mon Sep 17 00:00:00 2001 From: "Mamadou Khoussa [028918 DSI/DAC/DIF/DS]" Date: Tue, 28 Oct 2025 15:31:28 +0000 Subject: [PATCH] fix build --- src/main.ts | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/src/main.ts b/src/main.ts index a4be7d7..9959db4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,34 +21,12 @@ async function bootstrap() { .setDescription('API de gestion des utilisateurs pour le système DCB') .setVersion('1.0') .addTag('users', 'Gestion des utilisateurs') - .addBearerAuth( - { - type: 'http', - scheme: 'bearer', - bearerFormat: 'JWT', - name: 'JWT', - description: 'Entrez votre token JWT', - in: 'header', - }, - 'JWT-auth', // Nom de la référence - ) - .addServer('http://localhost:3000', 'Développement local') - .addServer('https://api.example.com', 'Production') + .addBearerAuth() + //.addServer('http://localhost:3000', 'Développement local') + // .addServer('https://api.example.com', 'Production') .build(); const document = SwaggerModule.createDocument(app, config); - SwaggerModule.setup('api/docs', app, document, { - customSiteTitle: 'DCB User Service API Docs', - customfavIcon: 'https://nestjs.com/img/logo_text.svg', - customJs: [ - 'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-bundle.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.min.js', - ], - customCssUrl: [ - 'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.min.css', - 'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.min.css', - 'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.css', - ], - }); + SwaggerModule.setup('api-docs', app, document); app.enableCors({ origin: '*' }) const port = process.env.PORT || 3000;