create license management
This commit is contained in:
+8
-3
@@ -5,8 +5,9 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
||||
import { AppModule } from './app.module'
|
||||
import { PrismaExceptionFilter } from './common/filters/prisma-exception.filter'
|
||||
import { ValidationExceptionFilter } from './common/filters/validation-exception.filter'
|
||||
import { ConsumerGuard } from './common/guards/auth-consumer.guard'
|
||||
import { PosGuard } from './common/guards/auth-pos.guard'
|
||||
import { JwtAuthGuard } from './common/guards/jwt-auth.guard'
|
||||
import { PosGuard } from './common/guards/pos.gaurd'
|
||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||
import { ResponseMappingInterceptor } from './common/interceptors/response-mapping.interceptor'
|
||||
import { PrismaService } from './prisma/prisma.service'
|
||||
@@ -81,9 +82,13 @@ async function bootstrap() {
|
||||
// Register global exception filters: validation errors and Prisma errors
|
||||
app.useGlobalFilters(new ValidationExceptionFilter(), new PrismaExceptionFilter())
|
||||
|
||||
app.useGlobalGuards(new JwtAuthGuard(app.get(JwtService), app.get(Reflector)))
|
||||
app.useGlobalGuards(
|
||||
new PosGuard(app.get(JwtService), app.get(Reflector), app.get(PrismaService)),
|
||||
new JwtAuthGuard(
|
||||
app.get(JwtService),
|
||||
app.get(Reflector),
|
||||
new ConsumerGuard(new PrismaService()),
|
||||
new PosGuard(new PrismaService()),
|
||||
),
|
||||
)
|
||||
|
||||
await app.listen(process.env.PORT ?? 5002)
|
||||
|
||||
Reference in New Issue
Block a user