Skip to content

Commit

Permalink
fix: 불필요한 코드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
yo0oni committed Feb 25, 2024
1 parent 0bdc823 commit 44a9b9c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import com.isp.backend.domain.schedule.dto.ScheduleRequestDTO;
import com.isp.backend.domain.schedule.dto.ScheduleResponseDTO;
import com.isp.backend.domain.schedule.dto.ScheduleSaveRequestDTO;
import com.isp.backend.domain.schedule.entity.Schedule;
import com.isp.backend.domain.schedule.service.ScheduleService;
import com.isp.backend.global.security.CustomUserDetails;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;
Expand All @@ -20,9 +22,11 @@ public class ScheduleController {

private final ScheduleService scheduleService;

public ResponseEntity<ScheduleResponseDTO> createSchedule(@RequestBody ScheduleRequestDTO scheduleRequestDTO) {
@PostMapping("/")
public ResponseEntity<ScheduleResponseDTO> createSchedule(@RequestBody ScheduleRequestDTO scheduleRequestDTO) {

ScheduleResponseDTO scheduleResponseDTO = scheduleService.createSchedule(scheduleRequestDTO);
return ResponseEntity.ok(scheduleResponseDTO);
}
/**
* 여행 일정 저장 API
Expand All @@ -44,12 +48,6 @@ public ResponseEntity<List<ScheduleListResponseDTO>> getScheduleList(@Authentica
List<ScheduleListResponseDTO> scheduleList = scheduleService.getScheduleList(uid);
return ResponseEntity.ok(scheduleList);
}
@PostMapping("/")
@ResponseStatus(HttpStatus.OK)
public ScheduleResponseDTO login(@RequestBody ScheduleRequestDTO scheduleRequestDTO) {
return new ScheduleResponseDTO(schedule);
Schedule schedule = scheduleService.create(scheduleRequestDTO.toEntity());


/**
* 여행 일정 상세 조회 API
Expand Down Expand Up @@ -85,4 +83,6 @@ public ResponseEntity<ScheduleSaveRequestDTO> updateSchedule(@AuthenticationPrin
// return ResponseEntity.ok().build(); == public void로
return ResponseEntity.ok(updatedSchedule);
}


}

0 comments on commit 44a9b9c

Please sign in to comment.