Skip to content

Commit

Permalink
Fix: remove bearer (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
hejin8307 committed May 9, 2024
1 parent 03e0aa7 commit 44a70d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public void deleteUser(@PathVariable int userIdx){

@GetMapping("/points")
public PointResDto getUserPoint(@RequestHeader MultiValueMap<String, String> headers){
String originalToken = headers.getFirst("authorization");
return memberService.getUserPoint(originalToken.substring(7, originalToken.length()));
return memberService.getUserPoint(headers.getFirst("authorization"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ public void deleteOrder(@PathVariable int orderIdx) {

@PostMapping("")
public void createOrder(@RequestHeader MultiValueMap<String, String> headers, @RequestBody List<OrderReqDto> 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);
Expand Down

0 comments on commit 44a70d5

Please sign in to comment.