Fixes
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 30s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / deploy (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been cancelled
Some checks failed
Music Collection CI Workflow / test (./backend) (push) Successful in 30s
Music Collection CI Workflow / test (./frontend) (push) Successful in 35s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / deploy (push) Has been cancelled
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Has been cancelled
This commit is contained in:
parent
fb67512092
commit
7c3e534111
@ -19,7 +19,7 @@ export class Album {
|
|||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty
|
@IsNotEmpty()
|
||||||
genre: string
|
genre: string
|
||||||
|
|
||||||
@OneToMany(() => Song, (song) => song.album, { eager: true, onDelete: 'CASCADE' })
|
@OneToMany(() => Song, (song) => song.album, { eager: true, onDelete: 'CASCADE' })
|
||||||
|
@ -50,11 +50,13 @@ export class AlbumService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const savedAlbum = await this.albumRepository.update({ id: updateAlbumDto.id }, {
|
await this.albumRepository.update({ id: updateAlbumDto.id }, {
|
||||||
title: updateAlbumDto.title,
|
title: updateAlbumDto.title,
|
||||||
artist: updateAlbumDto.artist,
|
artist: updateAlbumDto.artist,
|
||||||
genre: updateAlbumDto.genre
|
genre: updateAlbumDto.genre
|
||||||
});
|
});
|
||||||
|
const album = await this.albumRepository.findOneBy({ id: updateAlbumDto.id });
|
||||||
|
return album;
|
||||||
} else {
|
} else {
|
||||||
console.error("AlbumService: update: IDs do not match", id, updateAlbumDto);
|
console.error("AlbumService: update: IDs do not match", id, updateAlbumDto);
|
||||||
return null;
|
return null;
|
||||||
|
@ -51,12 +51,13 @@ export class SongService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const song = await this.songRepository.update({ id: updateSongDto.id }, {
|
await this.songRepository.update({ id: updateSongDto.id }, {
|
||||||
title: updateSongDto.title,
|
title: updateSongDto.title,
|
||||||
duration: updateSongDto.duration,
|
duration: updateSongDto.duration,
|
||||||
trackNumber: updateSongDto.trackNumber,
|
trackNumber: updateSongDto.trackNumber,
|
||||||
album: album,
|
album: album,
|
||||||
});
|
});
|
||||||
|
const song = await this.songRepository.findOneBy({ id: updateSongDto.id });
|
||||||
return song;
|
return song;
|
||||||
} else {
|
} else {
|
||||||
console.error("SongService: update: IDs do not match");
|
console.error("SongService: update: IDs do not match");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user