Skip to content

Commit

Permalink
hotfix : 항공권 조회 API POST로 메소드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayon-Hong committed May 13, 2024
1 parent 8177d1b commit b681572
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.isp.backend.domain.flight.dto.response.FlightLikeResponse;
import com.isp.backend.domain.flight.service.FlightOfferService;
import com.isp.backend.domain.flight.dto.request.FlightSearchRequest;
import com.isp.backend.global.exception.flight.FlightSearchFailedException;
import com.isp.backend.global.exception.flight.AmadeusSearchFailedException;
import com.isp.backend.global.exception.flight.SkyScannerGenerateFailedException;
import com.isp.backend.global.security.CustomUserDetails;
import lombok.RequiredArgsConstructor;
Expand All @@ -27,15 +27,15 @@ public class FlightOfferController {
private FlightOfferService flightOfferService;

/** 항공권 검색 API **/
@GetMapping("/search")
@PostMapping("/search")
public ResponseEntity<String> getFlightOffers(@AuthenticationPrincipal CustomUserDetails customUserDetails,
@RequestBody FlightSearchRequest request) {
String memberUid = customUserDetails.getUsername();
try {
String flightOffersJson = flightOfferService.getFlightOffers(request);
return ResponseEntity.ok(flightOffersJson);
} catch (ResponseException e) {
throw new FlightSearchFailedException();
throw new AmadeusSearchFailedException();
}
}

Expand Down

0 comments on commit b681572

Please sign in to comment.