Skip to content

Commit

Permalink
refactor: 불필요한 정적 팩토리 메서드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Feb 2, 2024
1 parent b0d5931 commit 051e1e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
Expand All @@ -21,18 +20,7 @@ public class AdminMemberController {

@GetMapping
public ResponseEntity<Page<AdminMemberFindAllResponse>> getMembers(
@RequestParam(value = "student-id", required = false) String studentId,
@RequestParam(value = "name", required = false) String name,
@RequestParam(value = "phone", required = false) String phone,
@RequestParam(value = "department", required = false) String department,
@RequestParam(value = "email", required = false) String email,
@RequestParam(value = "discord-username", required = false) String discordUsername,
@RequestParam(value = "discord-nickname", required = false) String discordNickname,
Pageable pageable) {

MemberQueryRequest queryRequest =
MemberQueryRequest.of(studentId, name, phone, department, email, discordUsername, discordNickname);

MemberQueryRequest queryRequest, Pageable pageable) {
Page<AdminMemberFindAllResponse> response = memberService.findAll(queryRequest, pageable);
return ResponseEntity.ok().body(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,4 @@ public record MemberQueryRequest(
String department,
String email,
String discordUsername,
String discordNickname) {

public static MemberQueryRequest of(
String studentId,
String name,
String phone,
String department,
String email,
String discordUsername,
String discordNickname) {
return new MemberQueryRequest(studentId, name, phone, department, email, discordUsername, discordNickname);
}
}
String discordNickname) {}

0 comments on commit 051e1e7

Please sign in to comment.