Skip to content

Commit

Permalink
🔥 fix: 그룹 생성 API 생성 타입 수정 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
loveysuby committed Jul 12, 2024
1 parent 32afef1 commit 510fc5b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package slvtwn.khu.toyouserver.application;

import java.util.List;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import slvtwn.khu.toyouserver.common.ErrorType;
Expand All @@ -12,7 +10,6 @@
import slvtwn.khu.toyouserver.exception.ToyouException;
import slvtwn.khu.toyouserver.persistance.GroupRepository;
import slvtwn.khu.toyouserver.persistance.UserRepository;
import slvtwn.khu.toyouserver.presentation.GroupMemberResponse;

@Service
@Transactional(readOnly = true)
Expand Down Expand Up @@ -40,9 +37,8 @@ public GroupResponse registerUser(long groupId, long userId) {

@Transactional
public GroupResponse create(String name) {
var group = new Group(name);
var savedGroup = groupRepository.save(group);
Group group = new Group(name);
Group savedGroup = groupRepository.save(group);
return new GroupResponse(savedGroup.getId(), savedGroup.getName());

}
}

0 comments on commit 510fc5b

Please sign in to comment.