Skip to content

Commit

Permalink
Merge pull request #40 from KORAD1004/feature/my-cource
Browse files Browse the repository at this point in the history
♻️Refactor: 저장 완료시 코드 리턴 해줘야 되는 것으로 바꿨습니다.
  • Loading branch information
Jindongleee authored Oct 8, 2024
2 parents 484dad0 + 50cb5ca commit 42bd1cb
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ public class ScheduleController {
@PostMapping
public ResponseEntity<?> createSchedule(@RequestBody CreateCourseDto createCourseDto) throws Exception{
try{
scheduleService.createSchedule(createCourseDto);
return ResponseEntity.ok(scheduleService.createSchedule(createCourseDto));
}catch (RuntimeException e){
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(e.getMessage());
}

return ResponseEntity.created(URI.create("/api/schedule")).build();
}

@GetMapping("/{travel_code}")
Expand Down

0 comments on commit 42bd1cb

Please sign in to comment.