Skip to content

Commit

Permalink
fix(movie): externalID isn't returned
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwitr0 committed Nov 16, 2023
1 parent 701fdc8 commit 7dad011
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/movie/entities/v1.4/meili-movie.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ItemName, Logo, Movie, Name, Rating, ShortImage, Votes, YearRange } from '../../schemas/movie.schema';
import { ExternalId, ItemName, Logo, Movie, Name, Rating, ShortImage, Votes, YearRange } from '../../schemas/movie.schema';
import { MeiliMovieEntity } from '../meili-movie.entity';
import { ApiProperty, ApiPropertyOptional, OmitType } from '@nestjs/swagger';
import { Expose } from 'class-transformer';
Expand All @@ -19,6 +19,10 @@ export class MeiliMovieEntityV1_4 extends OmitType(MeiliMovieEntity, [
@Expose()
names: Name[];

@ApiPropertyOptional({ type: () => ExternalId })
@Expose()
externalId: ExternalId;

@ApiPropertyOptional({ type: () => Logo })
@Expose()
logo: Logo;
Expand Down Expand Up @@ -102,6 +106,7 @@ export class MeiliMovieEntityV1_4 extends OmitType(MeiliMovieEntity, [

public fromMongoDocument(movie: Movie): this {
this.id = movie.id;
this.externalId = movie.externalId || null;
this.name = movie.name || '';
this.alternativeName = movie.alternativeName || '';
this.enName = movie.enName || '';
Expand Down

0 comments on commit 7dad011

Please sign in to comment.