diff --git a/src/main/java/com/hanaro/starbucks/controller/MemberController.java b/src/main/java/com/hanaro/starbucks/controller/MemberController.java index 3c84c35..cebc21f 100644 --- a/src/main/java/com/hanaro/starbucks/controller/MemberController.java +++ b/src/main/java/com/hanaro/starbucks/controller/MemberController.java @@ -71,7 +71,6 @@ public void deleteUser(@PathVariable int userIdx){ @GetMapping("/points") public PointResDto getUserPoint(@RequestHeader MultiValueMap headers){ - String originalToken = headers.getFirst("authorization"); - return memberService.getUserPoint(originalToken.substring(7, originalToken.length())); + return memberService.getUserPoint(headers.getFirst("authorization")); } } diff --git a/src/main/java/com/hanaro/starbucks/controller/OrderController.java b/src/main/java/com/hanaro/starbucks/controller/OrderController.java index 7aa7eb9..d75a5ce 100644 --- a/src/main/java/com/hanaro/starbucks/controller/OrderController.java +++ b/src/main/java/com/hanaro/starbucks/controller/OrderController.java @@ -42,9 +42,8 @@ public void deleteOrder(@PathVariable int orderIdx) { @PostMapping("") public void createOrder(@RequestHeader MultiValueMap headers, @RequestBody List dtos) { - String originalToken = headers.getFirst("authorization"); if(headers.containsKey("authorization") ){ - String token = originalToken.substring(7, originalToken.length()); + String token = headers.getFirst("authorization"); orderService.createOrder(token, dtos); }else{ orderService.createOrder("null", dtos);