Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.HttpClientErrorException;
Expand Down Expand Up @@ -43,7 +45,12 @@ public InviteCode registerInviteCode(String inviteCode, String userReferenceId)
String url = clubServiceUrl + "/admin/api/v1/authorize-admin";

try {
ResponseEntity<Void> response = restTemplate.postForEntity(url, clubId, Void.class);
HttpHeaders headers = new HttpHeaders();
headers.set("X-USER-REFERENCE-ID", userReferenceId);

HttpEntity<Long> requestEntity = new HttpEntity<>(clubId, headers);

ResponseEntity<Void> response = restTemplate.postForEntity(url, requestEntity, Void.class);
Comment on lines +48 to +53
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분에 대해서는 다음 스프린트 때 다시 어떻게 적용해야할지 고민해봐야겠네요!
고생 많으셨습니다 :)


if (!response.getStatusCode().is2xxSuccessful()) {
throw new IllegalArgumentException("동아리 관리자 권한 부여 실패");
Expand Down