From b42618775348331e73f18793fced352208e9763e Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Mon, 7 Apr 2025 13:37:05 +0100 Subject: [PATCH] Checking API calls --- backend/src/album/album.entity.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/album/album.entity.ts b/backend/src/album/album.entity.ts index 7e52bde..b3b9781 100644 --- a/backend/src/album/album.entity.ts +++ b/backend/src/album/album.entity.ts @@ -1,5 +1,5 @@ import { Entity, Column, OneToMany, PrimaryGeneratedColumn } from 'typeorm'; -import { IsNotEmpty, IsString } from 'class-validator'; +import { IsNotEmpty, IsString, IsOptional } from 'class-validator'; import { Song } from '../song/song.entity'; @Entity('album') @@ -22,6 +22,7 @@ export class Album { @IsNotEmpty() genre: string; + @IsOptional() @OneToMany(() => Song, (song) => song.album, { eager: true, onDelete: 'CASCADE',