Skip to content

Commit

Permalink
Merge pull request #53 from TeamPINGLE/fix/52
Browse files Browse the repository at this point in the history
[fix] 커스텀 헤더 이름 변경
  • Loading branch information
tkdwns414 authored Jan 11, 2024
2 parents 2794491 + aa22164 commit c0f1f06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class Constants {
public static final String USER_ROLE_CLAIM_NAME = "rol";
public static final String BEARER_PREFIX = "Bearer ";
public static final String AUTHORIZATION_HEADER = "Authorization";
public static final String GROUP_ID = "X-Group-Id";
public static final String TEAM_ID = "X-Team-Id";
public static final String PROVIDER_TOKEN = "X-Provider-Token";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class MeetingController {

@PostMapping
public ApiResponse<?> createMeeting(@Valid @RequestBody MeetingRequest request, @GUserId Long userId,
@RequestHeader(Constants.GROUP_ID) Long groupId) {
@RequestHeader(Constants.TEAM_ID) Long groupId) {
Pin pin = pinService.verifyAndReturnPin(request, groupId);//핀 없으면 핀 생성 후 반환, 있다면 핀 생성
Meeting meeting = meetingService.createMeeting(request, pin);//번개 생성
Long userMeetingId = userMeetingService.addOwnerToMeeting(userId, meeting);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public Object resolveArgument(MethodParameter parameter,
throw new CustomException(ErrorMessage.EMPTY_PRINCIPAL);
}

if (webRequest.getHeader(Constants.GROUP_ID) == null)
if (webRequest.getHeader(Constants.TEAM_ID) == null)
throw new CustomException(ErrorMessage.INVALID_HEADER_ERROR);
Long groupId = Long.valueOf(webRequest.getHeader(Constants.GROUP_ID));
Long groupId = Long.valueOf(webRequest.getHeader(Constants.TEAM_ID));

userMeetingService.verifyUser(getIdFromPrincipal(principal), groupId);

Expand Down

0 comments on commit c0f1f06

Please sign in to comment.