create license management

This commit is contained in:
2026-04-06 13:31:40 +03:30
parent c02e7afca1
commit 1160d81cdb
42 changed files with 1233 additions and 522 deletions
+8 -3
View File
@@ -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)