Skip to content

Commit

Permalink
fix: 알림 등록 요청 변수명 변경 deviceToken -> token (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Choi-JJunho authored Oct 16, 2023
1 parent d32ddc3 commit d3ace27
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void subscribeNotification(Member member, NotificationSubscribeRequest re
if (member.isSubscribe()) {
throw new IllegalArgumentException("이미 알림을 구독하고 있습니다.");
}
member.updateDeviceToken(request.getDeviceToken());
member.updateDeviceToken(request.getToken());
}

@Transactional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
public class NotificationSubscribeRequest {

@NotNull
private String deviceToken;
private String token;
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class 알림_구독_ {
.session(session)
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(objectMapper.writeValueAsString(NotificationSubscribeRequest.builder()
.deviceToken("deviceToken")
.token("deviceToken")
.build())))
.andDo(document("member/subscribeNotification/",
preprocessRequest(prettyPrint()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MemberServiceTest {
.build();

memberService.subscribeNotification(saveMember, NotificationSubscribeRequest.builder()
.deviceToken("deviceToken")
.token("deviceToken")
.build());

assertThat(saveMember.getDeviceToken()).isEqualTo("deviceToken");
Expand All @@ -102,7 +102,7 @@ class MemberServiceTest {
.deviceToken("deviceToken")
.build();
NotificationSubscribeRequest request = NotificationSubscribeRequest.builder()
.deviceToken("deviceToken")
.token("deviceToken")
.build();

Assertions.assertThatThrownBy(() -> {
Expand Down

0 comments on commit d3ace27

Please sign in to comment.