Skip to content

Commit 3341bfd

Browse files
Fix: 아키텍쳐 구조 수정
1 parent fc6a2ef commit 3341bfd

3 files changed

Lines changed: 1 addition & 32 deletions

File tree

src/main/java/flipnote/group/adapter/out/persistence/GroupRepositoryAdapter.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,4 @@ public Group findById(Long id) {
3535
);
3636
return GroupMapper.toDomain(groupEntity);
3737
}
38-
39-
/**
40-
* 그룹 수정
41-
* @param group
42-
*/
43-
@Override
44-
public Group update(Group group) {
45-
46-
GroupEntity groupEntity = groupRepository.findById(group.getId()).orElseThrow(
47-
() -> new IllegalArgumentException("group not Exist")
48-
);
49-
50-
groupEntity.change(
51-
group.getName(),
52-
group.getCategory(),
53-
group.getDescription(),
54-
group.getJoinPolicy(),
55-
group.getVisibility(),
56-
group.getMaxMember(),
57-
group.getImageRefId()
58-
);
59-
60-
return GroupMapper.toDomain(groupEntity);
61-
}
62-
6338
}

src/main/java/flipnote/group/application/port/out/GroupRepositoryPort.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ public interface GroupRepositoryPort {
66
Long saveNewGroup(Group group);
77

88
Group findById(Long id);
9-
10-
Group update(Group group);
119
}

src/main/java/flipnote/group/application/service/FindGroupService.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ public class FindGroupService implements FindGroupUseCase {
2727
@Override
2828
public FindGroupResult findGroup(FindGroupCommand cmd) {
2929

30-
GroupEntity groupEntity = groupRepository.findById(cmd.groupId()).orElseThrow(
31-
() -> new IllegalArgumentException("Group not Exists")
32-
);
33-
34-
Group group = GroupMapper.toDomain(groupEntity);
30+
Group group = groupRepository.findById(cmd.groupId());
3531

3632
return new FindGroupResult(group);
3733
}

0 commit comments

Comments
 (0)