Skip to content

Commit

Permalink
#81 Feat: 팀 프로필 수정 서비스 구현체 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
insa658723 committed Aug 5, 2024
1 parent 311c96f commit e978ed1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@Entity
@Getter
@Setter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ public Team updateTeam(Long teamId, TeamRequestDTO.UpdateTeamDTO request) {
return teamRepository.save(team);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,26 @@ public class TeamController {
private final TeamCommandService teamCommandService;
//팀 생성
@PostMapping()
@Operation(
summary = "팀 생성"
)
@Operation(summary = "팀 생성")
public ApiResponse<TeamResponseDTO.CreateTeamResponseDTO> createTeam(
@RequestBody TeamRequestDTO.CreateTeamRequestDTO request
){
Team newTeam = teamCommandService.createTeam(request);
return ApiResponse.onSuccess(
SuccessStatus.TEAM_OK,
TeamConverter.toCreateMemberDTO(newTeam)
);
TeamConverter.toCreateMemberDTO(newTeam));
}

//팀 프로필 수정
// 팀 프로필 수정
@PatchMapping("/profile/{teamId}")
@Operation(
summary = "팀 프로필 수정"
)
@Operation(summary = "팀 프로필 수정")
public ApiResponse<TeamResponseDTO.UpdateTeamDTO> updateTeam(
@RequestBody TeamRequestDTO.UpdateTeamDTO request,
@PathVariable Long teamId
){
@PathVariable Long teamId) {
Team updatedTeam = teamCommandService.updateTeam(teamId, request);
return ApiResponse.onSuccess(
SuccessStatus.TEAM_OK,
TeamConverter.toUpdateTeamDTO(
teamCommandService.updateTeam(teamId)
)
);
TeamConverter.toUpdateTeamDTO(updatedTeam));
}

//팀 팔로우
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ public static class CreateTeamRequestDTO { //팀 생성
private String instagram;
}

@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class CheckTeam { //팀 조회
private Long teamId;
}

@Getter
@Builder
@AllArgsConstructor
Expand All @@ -45,4 +37,12 @@ public static class UpdateTeamDTO { //팀 프로필 수정
private String discord;
private String instagram;
}

@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class CheckTeam { //팀 조회
private Long teamId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,36 @@ public static class CreateTeamResponseDTO { // 팀 생성
String profilePhoto;
}

@Builder
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class TeamCheckResponseDTO { // 팀 조회
public static class UpdateTeamDTO { // 팀 프로필 수정
Long teamId;
String name;
String intro;
String profilePhoto;
String github;
String email;
String linkedIn;
String discord;
String instagram;
}

@Getter
@Builder
@Getter
@NoArgsConstructor
@AllArgsConstructor
public static class UpdateTeamDTO { // 팀 프로필 수정
public static class TeamCheckResponseDTO { // 팀 조회
Long teamId;
String name;
String intro;
String profilePhoto;
String github;
String email;
String linkedIn;
String discord;
String instagram;
}


@Builder
public record TeamFollowResponseDto( //팀 팔로우 기능
Long followId,
Expand Down

0 comments on commit e978ed1

Please sign in to comment.