Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 알림 등록 요청 변수명 변경 deviceToken -> token #440

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
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 @@ -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
Loading