From 79f35168a846036db1fa326c682e81d5fb0c9a47 Mon Sep 17 00:00:00 2001 From: Inga <52715130+inga-lovinde@users.noreply.github.com> Date: Thu, 8 Feb 2024 22:47:30 +0000 Subject: [PATCH] minor fix --- src/movies.controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/movies.controller.ts b/src/movies.controller.ts index 60880bd..f55623f 100644 --- a/src/movies.controller.ts +++ b/src/movies.controller.ts @@ -10,7 +10,7 @@ import { import { ApiPropertyOptional } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsIn, IsInt, IsOptional, IsString, Length } from 'class-validator'; -import { EnrichedDataService } from './types'; +import { EnrichedDataService, MovieData } from './types'; const ENTRY_TYPES = ['movie', 'series', 'episode'] as const; @@ -90,7 +90,7 @@ export class MoviesController { ) {} @Get() - searchMovies(@Query() query: SearchDto) { + searchMovies(@Query() query: SearchDto): MovieData[] { if (!Object.values(query).some((filterValue) => filterValue)) { throw new BadRequestException('Query should not be empty'); } @@ -100,7 +100,7 @@ export class MoviesController { } @Get(':id') - getMovie(@Param('id') id: string) { + getMovie(@Param('id') id: string): MovieData { const result = /^\d+$/.test(id) ? this.enrichedDataService.getMetadataByInternalId(parseInt(id, 10)) : this.enrichedDataService.getMetadataByImdbId(id);