diff --git a/backend/src/main.ts b/backend/src/main.ts index 58f0758..761f105 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -1,9 +1,5 @@ import { NestFactory } from '@nestjs/core'; -import { - UnprocessableEntityException, - ValidationError, - ValidationPipe, -} from '@nestjs/common'; +import { UnprocessableEntityException, ValidationError, ValidationPipe } from '@nestjs/common'; import { AppModule } from './app.module'; async function bootstrap() { @@ -26,8 +22,7 @@ async function bootstrap() { validationErrors: ValidationError[], parentProperty = '', ): Array<{ property: string; errors: string[] }> => { - const errors: Array<{ property: string; errors: string[] }> = []; - + const errors : Array<{ property: string; errors: string[] }> = []; const getValidationErrorsRecursively = ( validationErrors: ValidationError[], parentProperty = '', @@ -43,20 +38,15 @@ async function bootstrap() { errors: Object.values(error.constraints), }); } - if (error.children?.length) { getValidationErrorsRecursively(error.children, propertyPath); } } }; - getValidationErrorsRecursively(validationErrors, parentProperty); - return errors; }; - const errors = getPrettyClassValidatorErrors(validationErrors); - return new UnprocessableEntityException({ message: 'validation error', errors: errors, diff --git a/frontend/src/app/album/page.tsx b/frontend/src/app/album/page.tsx index e9d8562..5f9b439 100644 --- a/frontend/src/app/album/page.tsx +++ b/frontend/src/app/album/page.tsx @@ -111,7 +111,6 @@ export default function Page() { setSnackbarMessage(message); setSnackbarSuccess(severity); handleOpenSnackbar(); - } if (!albums) return