Skip to content

Commit

Permalink
[DEV-000] 픽스존 상세 조회에서 동아리 위치와 이름 조회 가능하도록 변경 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjunYou authored Aug 8, 2024
1 parent 1e1ec6d commit 4ff190c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
Expand Down Expand Up @@ -46,7 +47,7 @@ public interface ClubFixZoneApi {
@SecurityRequirement(name = "AccessToken")
void createFixZone(
@AuthenticationPrincipal PrincipalDetails principalDetails,
@RequestPart CreateFixZoneRequest request,
@ModelAttribute CreateFixZoneRequest request,
@RequestPart(name = "images", required = false) List<MultipartFile> images
);

Expand All @@ -57,7 +58,7 @@ void createFixZone(
void updateFixZone(
@AuthenticationPrincipal PrincipalDetails principalDetails,
@PathVariable("fixZoneId") Long fixZoneId,
@RequestPart UpdateFixZoneRequest request,
@ModelAttribute UpdateFixZoneRequest request,
@RequestPart(name = "images", required = false) List<MultipartFile> images
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public record GetDetailFixZoneResponse(
@Schema(description = "픽스존 id")
Long id,

@Schema(description = "동아리 위치")
String clubLocation,

@Schema(description = "동아리명")
String clubName,

@Schema(description = "제목")
String title,

Expand All @@ -33,6 +39,8 @@ public record GetDetailFixZoneResponse(

public static GetDetailFixZoneResponse of(
Long id,
String clubLocation,
String clubName,
String title,
LocalDateTime createdAt,
String content,
Expand All @@ -42,6 +50,8 @@ public static GetDetailFixZoneResponse of(
) {
return new GetDetailFixZoneResponse(
id,
clubLocation,
clubName,
title,
content,
isCompleted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public GetDetailFixZoneResponse getFixZoneDetail(Long fixZoneId) {

return GetDetailFixZoneResponse.of(
fixZone.getId(),
fixZone.getClub().getLocation().getValue(),
fixZone.getClub().getName(),
fixZone.getTitle(),
fixZone.getCreatedAt(),
fixZone.getContent(),
Expand Down

0 comments on commit 4ff190c

Please sign in to comment.