Skip to content

Commit

Permalink
Merge pull request #103 from Gseungmin/main
Browse files Browse the repository at this point in the history
[test]: otherId 정보 체크를 위한 로직
  • Loading branch information
Gseungmin authored Aug 12, 2023
2 parents 9554f51 + ac446bd commit 5c60fbd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -36,12 +37,13 @@ public OAuth2 auth(Authentication authentication, HttpServletRequest request) {
}

@GetMapping("/oauth2/fcm")
public FCM getFcm(HttpServletRequest request) {

String otherId = request.getParameter("otherId");
public FCM getFcm(@RequestHeader("otherId") String otherId) {

Optional<Member> other = memberService.findMemberByName(otherId);

System.out.println("=====================================");
System.out.println(otherId);

return new FCM(other.get().getFcm());
}
}

0 comments on commit 5c60fbd

Please sign in to comment.