Skip to content

Commit

Permalink
GETP-308 fix: 피플 좋아요 여부 메소드에 member 객체 null 체크 추가 (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
scv1702 authored Oct 13, 2024
1 parent fa35933 commit dfe520c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class PeopleQueryController extends ControllerSupport {
* @return 피플 ID에 해당되는 피플 상세 정보
*/
@GetMapping("/{peopleId}")
public ResponseEntity<? extends ApiSuccessResult<?>> getPeople(
public ResponseEntity<ApiSuccessResult<PeopleDetailResponse>> getPeople(
@AuthenticationPrincipal final PrincipalDetails principalDetails,
@PathVariable final Long peopleId
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public boolean existsBy(final MemberId memberId, final PeopleId peopleId) {
}

@Override
public Boolean existsBy(Member member, PeopleId peopleId) {
if (member.isPeople()) {
public Boolean existsBy(final Member member, final PeopleId peopleId) {
if (member == null || member.isPeople()) {
return null;
}
return existsBy(member.getId(), peopleId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ public void delete(final ProjectLike projectLike) {
}

@Override
public Boolean existsBy(final Member member, ProjectId projectId) {
public Boolean existsBy(final Member member, final ProjectId projectId) {
if (member == null || member.isClient()) {
return null;
}
return repository.existsByMemberIdAndProjectId(
member.getId().getValue(),
projectId.getValue()
);
return existsBy(member.getId(), projectId);
}

@Override
Expand All @@ -57,7 +54,7 @@ public ProjectLike loadBy(final MemberId memberId, final ProjectId projectId) {
}

@Override
public boolean existsBy(MemberId memberId, ProjectId projectId) {
public boolean existsBy(final MemberId memberId, final ProjectId projectId) {
return repository.existsByMemberIdAndProjectId(
memberId.getValue(),
projectId.getValue()
Expand Down

0 comments on commit dfe520c

Please sign in to comment.