Skip to content

Commit

Permalink
refactor: 예약 내역 상세에 Security 적용
Browse files Browse the repository at this point in the history
예약 내역 상세에 Security 적용
  • Loading branch information
Hwang-Kyu-Cheol committed Jan 20, 2024
1 parent 8be0b07 commit 9d1e8eb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
Expand Down Expand Up @@ -44,8 +43,8 @@ public ResponseBody<List<OrderSummaryResponse>> getSellableOrders(
@GetMapping("/{orderId}")
public ResponseBody<OrderInfoResponse> getOrderInfo(
@PathVariable Long orderId,
@RequestParam Long currentUserId
@AuthenticationPrincipal PrincipalDetails principalDetails
) {
return ResponseBody.ok(orderService.getOrderInfo(orderId, currentUserId));
return ResponseBody.ok(orderService.getOrderInfo(orderId, principalDetails.id()));
}
}

0 comments on commit 9d1e8eb

Please sign in to comment.