add SentryGlobalFilter
This commit is contained in:
+15
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user