Skip to content

Commit

Permalink
Merge pull request #152 from TEAM-YOAJUNG/hotfix/admin-service-clubId
Browse files Browse the repository at this point in the history
[FIX] admin-service의 club-service 요청 본문 수정
  • Loading branch information
EeeasyCode authored Nov 20, 2024
2 parents eb5622b + 3b52111 commit 3727b1b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ public InviteCode registerInviteCode(String inviteCode, String userReferenceId)
Long clubId = existingCode.getClubId();
String url = clubServiceUrl + "/admin/api/v1/authorize-admin";

AuthorizeAdminRequest request = new AuthorizeAdminRequest(clubId, userReferenceId);

try {
ResponseEntity<Boolean> response = restTemplate.postForEntity(url, request, Boolean.class);
ResponseEntity<Boolean> response = restTemplate.postForEntity(url, clubId, Boolean.class);

if (!response.getStatusCode().is2xxSuccessful() || Boolean.FALSE.equals(response.getBody())) {
throw new IllegalArgumentException("동아리 관리자 권한 부여 실패");
Expand All @@ -59,4 +57,4 @@ public InviteCode registerInviteCode(String inviteCode, String userReferenceId)

return existingCode;
}
}
}

0 comments on commit 3727b1b

Please sign in to comment.