Skip to content

Commit 2c89dc6

Browse files
authored
[Feat] controller에서 multipart form을 명시한다. (#127)
* feat: 코스 생성 원래 버전으로 되돌린다. * feat: controller에서 multipart form을 명시한다.
1 parent 7b86b74 commit 2c89dc6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/runnect/server/course/controller/CourseController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.runnect.server.course.service.CourseService;
2020
import org.runnect.server.external.aws.S3Service;
2121
import org.springframework.http.HttpStatus;
22+
import org.springframework.http.MediaType;
2223
import org.springframework.validation.BindingResult;
2324
import org.springframework.web.bind.annotation.GetMapping;
2425
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -40,7 +41,7 @@ public class CourseController {
4041
private final S3Service s3Service;
4142
private final CourseService courseService;
4243

43-
@PostMapping
44+
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
4445
@ResponseStatus(HttpStatus.CREATED)
4546
public ApiResponseDto<CourseCreateResponseDto> createCourse(
4647
@UserId Long userId,

0 commit comments

Comments
 (0)