@@ -182,7 +182,7 @@ public PartyListResponse getPartyList(Long userId, PartyCategory category) {
182182 /**
183183 * 파티 상세 조회
184184 */
185- public PartyDetailResponse getPartyDetail (Long partyId , Long userId , UserLocation userLocation ) {
185+ public PartyDetailResponse getPartyDetail (Long partyId , Long userId , Double userLat , Double userLon ) {
186186 Party party = partyRepository .findById (partyId )
187187 .orElseThrow (() -> new IllegalArgumentException ("파티를 찾을 수 없습니다" ));
188188
@@ -200,10 +200,10 @@ public PartyDetailResponse getPartyDetail(Long partyId, Long userId, UserLocatio
200200
201201 // 거리 계산 (사용자 위치 필요)
202202 double distance = 0.0 ;
203- if (validateLocation (user ,userLocation ,party )) {
203+ if (validateLocation (user ,userLat , userLon ,party )) {
204204 distance = DistanceCalculator .calculateDistance (
205- userLocation . getLatitude () ,
206- userLocation . getLongitude () ,
205+ userLat ,
206+ userLon ,
207207 party .getPickupLocation ().getPickupLatitude (),
208208 party .getPickupLocation ().getPickupLongitude ()
209209 );
@@ -212,10 +212,10 @@ public PartyDetailResponse getPartyDetail(Long partyId, Long userId, UserLocatio
212212 return convertToDetailResponse (party , distance , isParticipating );
213213 }
214214
215- private boolean validateLocation (User user , UserLocation userLocation , Party party ) {
215+ private boolean validateLocation (User user , Double userLat , Double userLon , Party party ) {
216216 return (user != null
217- && userLocation . getLatitude () != null
218- && userLocation . getLongitude () != null
217+ && userLat != null
218+ && userLon != null
219219 && party .getPickupLocation ().getPickupLatitude ()!= null
220220 && party .getPickupLocation ().getPickupLongitude ()!=null );
221221 }
0 commit comments