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] 그룹 이름 수정 API에서 그룹 이름 변경 오류 해결 #69

Merged
merged 3 commits into from
Nov 27, 2024
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
5 changes: 5 additions & 0 deletions src/main/java/com/pictalk/group/dto/GroupRequestDto.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.pictalk.group.dto;

import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class GroupRequestDto {
@Getter
Expand All @@ -10,6 +13,8 @@ public static class CreateGroupRequest {
}

@Getter
@NoArgsConstructor
@AllArgsConstructor
public static class UpdateGroupRequest {
private String groupName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public List<Group> getAllGroupsByUser(String userEmail) {
return groupRepository.findAllByUser(user);
}

@Transactional
public void updateGroup(Long groupId, UpdateGroupRequest updateGroupRequest) {
Group group = groupRepository.findById(groupId)
.orElseThrow(() -> new GeneralException(ErrorStatus.GROUP_NOT_FOUND));
Expand Down