Skip to content
Snippets Groups Projects
Commit 855070b2 authored by Martin Korec's avatar Martin Korec
Browse files

fix: edited movie update db call

parent c5a38b54
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,11 @@ export class MoviesService {
async update(id: string, updateMovieDto: UpdateMovieDto): Promise<Movie> {
const updatedMovie = {
...(await this.findOne(id)),
...(await this.prisma.movie.findUnique({
where: {
id,
},
})),
...plainToClass(MovieEntity, updateMovieDto),
};
return await this.prisma.movie.update({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment