Skip to content

Commit

Permalink
fix: merge 충돌 해결 (#81) (KAN-139)
Browse files Browse the repository at this point in the history
  • Loading branch information
seok019283501 committed Nov 6, 2024
2 parents 587483a + 1d81f2e commit 7825638
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ dependencies {
spotless {
java {
target('**/*.java')
targetExclude('src/*/generated/**/*.*')
targetExclude('src/main/generated/**/*.java')

importOrder()
removeUnusedImports()
googleJavaFormat().aosp().formatJavadoc(false)
Expand All @@ -80,14 +81,14 @@ spotless {

def generated = file("src/main/generated")

clean {
delete generated
}

tasks.withType(JavaCompile) {
options.generatedSourceOutputDirectory = file(generated)
}

clean {
delete generated
}

// Add generated sources to the main source set
sourceSets {
main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

public enum GroupErrorType implements ErrorTypeCode {
ALREADY_EXISTS("BAD REQUEST", "그룹이 이미 존재합니다."),
GROUP_USER_NOT_FOUND("NOT FOUND", "그룹 회원 정보를 찾을 수 없습니다."),
GROUP_NOT_FOUND("NOT FOUND", "그룹 정보를 찾을 수 없습니다.");
GROUP_MEMBER_ALREADY_EXISTS("BAD REQUEST", "유저가 그룹에 이미 속해 있습니다."),
NOT_FOUND("NOT FOUND", "그룹이 존재하지 않습니다."),
GROUP_MEMBER_NOT_FOUND("NOT FOUND", "그룹 회원 정보를 찾을 수 없습니다.");

private final String message;
private final String description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public GroupTotalResponse getGroupTotalData(Long memberId) {
GroupEntity groupEntity =
Optional.ofNullable(groupMemberService.getGroup(memberId))
.orElseThrow(
() -> new NotFoundException(GroupErrorType.GROUP_USER_NOT_FOUND));
() -> new NotFoundException(GroupErrorType.GROUP_MEMBER_NOT_FOUND));

return GroupResponseMapper.fromGroupTotal(groupEntity);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public GroupInfoResponse getUserGroupInfo(Long memberId) {
groupMemberRepository
.findByDeviceId(memberId)
.orElseThrow(
() -> new NotFoundException(GroupErrorType.GROUP_USER_NOT_FOUND));
() -> new NotFoundException(GroupErrorType.GROUP_MEMBER_NOT_FOUND));

return new GroupInfoResponse(groupMember.getGroup().getId());
}
Expand All @@ -51,14 +51,14 @@ public CctvInviteResponse generateCctvInvite(Long memberId) {
groupMemberRepository
.findByDeviceId(memberId)
.orElseThrow(
() -> new NotFoundException(GroupErrorType.GROUP_USER_NOT_FOUND));
() -> new NotFoundException(GroupErrorType.GROUP_MEMBER_NOT_FOUND));
String kvsChannelName = kvsChannelNameGenerator.generateUniqueKvsChannelName();

return new CctvInviteResponse(groupMember.getGroup().getId(), kvsChannelName);
}

public GroupEntity getGroup(Long memberId) {
return Optional.ofNullable(groupMemberRepository.findDevice(memberId))
.orElseThrow(() -> new NotFoundException(GroupErrorType.GROUP_USER_NOT_FOUND));
.orElseThrow(() -> new NotFoundException(GroupErrorType.GROUP_MEMBER_NOT_FOUND));
}
}

0 comments on commit 7825638

Please sign in to comment.