Skip to content

Commit

Permalink
[fix] #174 response body 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
2hyunjinn committed Jan 22, 2025
1 parent 9493f13 commit f421d35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ResponseEntity<ApiResponse<ReadFillMembersResponse>> getGroupMembers(
}

@GetMapping("/my/groups")
public ResponseEntity<ApiResponse<List<MyGroupResponse>>> getMyGroups(
public ResponseEntity<ApiResponse<FinalMyGroupResponse>> getMyGroups(
@RequestHeader("Authorization") final String accessToken,
@RequestParam(value = "category") FillGroupType category,
@RequestParam(value = "status") boolean status
Expand All @@ -92,7 +92,11 @@ public ResponseEntity<ApiResponse<List<MyGroupResponse>>> getMyGroups(
throw new GongBaekException(ResponseError.BAD_REQUEST);
}

return ResponseBuilder.ok(groupFacade.getMyGroups(userId, category, status));
FinalMyGroupResponse finalResponse = new FinalMyGroupResponse(
groupFacade.getMyGroups(userId, category, status)
);

return ResponseBuilder.ok(finalResponse);
}

@GetMapping("/fill/groups")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.ggang.be.api.group.dto;

import java.util.List;

public record FinalMyGroupResponse(
List<MyGroupResponse> groups
) {
}

0 comments on commit f421d35

Please sign in to comment.