From 21582bb5d8a1614f4ecc016890e4ed79c1efdfa8 Mon Sep 17 00:00:00 2001 From: JeongYeonSeung Date: Sat, 30 Nov 2024 23:36:11 +0900 Subject: [PATCH] =?UTF-8?q?fix::=20=ED=95=98=EB=93=9C=EC=BD=94=EB=94=A9?= =?UTF-8?q?=EB=90=9C=20=EB=B3=80=EC=88=98=20dto=EC=97=90=20static=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=84=A0=EC=96=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/course/course.service.ts | 2 +- src/course/dto/paginated-courses.dto.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/course/course.service.ts b/src/course/course.service.ts index 7059760e..686fe7a6 100644 --- a/src/course/course.service.ts +++ b/src/course/course.service.ts @@ -443,7 +443,7 @@ export class CourseService { ): Promise { const { keyword, cursorId, year, semester } = searchCoursesWithKeywordDto; - const LIMIT = 21; + const LIMIT = PaginatedCoursesDto.LIMIT; let queryBuilder = this.courseRepository .createQueryBuilder('course') diff --git a/src/course/dto/paginated-courses.dto.ts b/src/course/dto/paginated-courses.dto.ts index 446ef66d..7c1818a7 100644 --- a/src/course/dto/paginated-courses.dto.ts +++ b/src/course/dto/paginated-courses.dto.ts @@ -2,6 +2,8 @@ import { ApiProperty } from '@nestjs/swagger'; import { CommonCourseResponseDto } from './common-course-response.dto'; export class PaginatedCoursesDto { + static readonly LIMIT = 21; + @ApiProperty({ description: '다음 페이지 존재 여부' }) hasNextPage: boolean;