add SentryGlobalFilter

This commit is contained in:
Hanim
2025-09-05 14:38:49 +02:00
parent f9f59f9c95
commit 59096a449a
2 changed files with 70 additions and 58 deletions
+15 -1
View File
@@ -8,7 +8,9 @@ import { JwtService } from '@nestjs/jwt';
import { RolesGuard } from './common/guards/roles.guard';
async function bootstrap() {
const app = await NestFactory.create(AppModule, {logger: ["error", "warn", "log", "debug", "verbose"]});
const app = await NestFactory.create(AppModule,
{logger: ['error', 'warn', 'log', 'debug', 'verbose']});
app.enableCors();
const configService = app.get(ConfigService);
@@ -17,7 +19,19 @@ async function bootstrap() {
const config = new DocumentBuilder()
.setTitle("P'titsPas API")
.setDescription("API pour l'application P'titsPas")
.setVersion('1.0.0')
.addBearerAuth(
{
type: 'http',
scheme: 'Bearer',
bearerFormat: 'JWT',
name: 'Authorization',
description: 'Enter JWT token',
in: 'header',
},
'access-token',
)
.build();
const document = SwaggerModule.createDocument(app, config);