diff --git a/packages/core-service/src/core/auth/auth.service.ts b/packages/core-service/src/core/auth/auth.service.ts index 8d0ccc5..9d1b2ba 100644 --- a/packages/core-service/src/core/auth/auth.service.ts +++ b/packages/core-service/src/core/auth/auth.service.ts @@ -28,6 +28,7 @@ interface LoginResponse { firstName: string; lastName: string; role: string; + twoFactorEnabled: boolean; }; requiresTwoFactor?: boolean; } diff --git a/packages/core-service/src/main.ts b/packages/core-service/src/main.ts index 64173cd..5857ca8 100644 --- a/packages/core-service/src/main.ts +++ b/packages/core-service/src/main.ts @@ -3,6 +3,7 @@ import { ValidationPipe, Logger } from '@nestjs/common'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import cookieParser from 'cookie-parser'; import helmet from 'helmet'; +import { json } from 'express'; import { AppModule } from './app.module'; async function bootstrap(): Promise { @@ -16,7 +17,7 @@ async function bootstrap(): Promise { app.use(cookieParser()); // Body size limit erhoehen fuer Base64 Avatar-Uploads (Standard ~100KB) - app.useBodyParser('json', { limit: '1mb' }); + app.use(json({ limit: '1mb' })); // CORS const corsOrigins = process.env.CORS_ORIGINS?.split(',') ?? [