Skip to content

Commit

Permalink
fix: 코스 공개여부/핀 DTO 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Miensoap committed Dec 2, 2024
1 parent 6a4b872 commit 505fe38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/src/course/CourseController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class CourseController {
@UseGuards(JwtAuthGuard, CoursePermissionGuard)
async updateCourseVisibility(
@Param('id') id: number,
@Body('isPublic')
@Body()
updateCourseVisibilityRequest: UpdateCourseVisibilityRequest,
) {
await this.courseService.updateVisibility(
Expand Down
6 changes: 2 additions & 4 deletions backend/src/course/dto/UpdatePinsOfCourseRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
IsNumber,
IsString,
Validate,
ValidateNested,
} from 'class-validator';
import { Type } from 'class-transformer';
import { IsNotConsecutiveDuplicatePlace } from '@src/course/pipes/IsNotConsecutiveDuplicatePlace';
Expand All @@ -19,9 +18,8 @@ export class UpdatePinsOfCourseRequestItem {
}

export class UpdatePinsOfCourseRequest {
@IsArray()
@ValidateNested({ each: true })
@Type(() => UpdatePinsOfCourseRequestItem)
@Validate(IsNotConsecutiveDuplicatePlace)
@Type(() => UpdatePinsOfCourseRequestItem)
@IsArray()
pins: UpdatePinsOfCourseRequestItem[];
}

0 comments on commit 505fe38

Please sign in to comment.