Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PotController {
- potStatus: RECRUITING / ONGOING / COMPLETED
- potStartDate, potEndDate: yyyy.MM 형식 (예: 2025.08)
- potModeOfOperation: ONLINE / OFFLINE / HYBRID
- Role: FRONTEND / BACKEND / DESIGN / PLANNING
- Role: FRONTEND / BACKEND / DESIGN / PLAN
""")
@PostMapping
public ResponseEntity<ApiResponse<PotResponseDto>> createPot(@RequestBody @Valid PotRequestDto requestDto) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package stackpot.stackpot.pot.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -10,6 +11,8 @@
@Builder
public class PotRecruitmentRequestDto {
@ValidRole
@Schema(description = "모집 역할", example = "BACKEND")
private String recruitmentRole;
@Schema(description = "역할 별 모집 인원 수", example = "1")
private Integer recruitmentCount;
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public List<PotMemberAppealResponseDto> addMembersToPot(Long potId, PotMemberReq
}

// 생성자 PotMember는 이미 createPot 단계에서 저장됨 → 새로 만들지 말고 조회
PotMember creatorPM = potMemberRepository
.findByPotIdAndUserId(potId, potCreator.getId());
PotMember creatorPM = potMemberRepository.findByPotIdAndUserId(potId, potCreator.getId());
if (creatorPM == null) {
throw new PotHandler(ErrorStatus.POT_MEMBER_NOT_FOUND);
}

// 승인된 멤버들만 저장
List<PotMember> savedMembers = potMemberRepository.saveAll(newMembers);
Expand Down Expand Up @@ -113,7 +115,7 @@ public void updateAppealContent(Long potId, String appealContent) {
}

@Override
@org.springframework.transaction.annotation.Transactional
@Transactional
public void removeMemberFromPot(Long potId) {
User user = authService.getCurrentUser();
Pot pot = potRepository.findById(potId)
Expand Down