fix: resolve TypeScript compilation errors in core service

- Add twoFactorEnabled to LoginResponse user type
- Replace useBodyParser with express json() middleware for body limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-09 07:00:17 +01:00
parent 6fa86714db
commit b5ec4e13b7
2 changed files with 3 additions and 1 deletions

View file

@ -28,6 +28,7 @@ interface LoginResponse {
firstName: string;
lastName: string;
role: string;
twoFactorEnabled: boolean;
};
requiresTwoFactor?: boolean;
}

View file

@ -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<void> {
@ -16,7 +17,7 @@ async function bootstrap(): Promise<void> {
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(',') ?? [