Skip to content

Commit

Permalink
Merge pull request #148 from Gongjakso/refactor/qa
Browse files Browse the repository at this point in the history
fix: QA 사항 수정
  • Loading branch information
dl-00-e8 authored May 18, 2024
2 parents 248e969 + c5b22ae commit e0fa7c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public ApplicationResponse<CategoryRes> getCategory(@PathVariable("post_id") Lon
@Operation(summary = "공고 마감 API", description = "내가 모집 중인 팀 페이지에서 공고 마감 버튼 클릭시")
@PatchMapping("/{post_id}/close")
public ApplicationResponse<Void> updatePostStatusToClose(@AuthenticationPrincipal PrincipalDetails principalDetails, @PathVariable("post_id") Long postId){
applyService.updatePostState(principalDetails.getMember(),postId, PostStatus.CLOSE);
applyService.updatePostState(principalDetails.getMember(),postId, PostStatus.ACTIVE);
return ApplicationResponse.ok();
}
//공고 취소 요청 api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public GetPostRelation checkPostRelation(Member member, Long postId) {

@Transactional
public Page<GetProjectRes> getMyScrapProject(Member member, Pageable page){
Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by(Sort.Direction.DESC, "created_at"));
Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by("createdAt").descending());

Page<PostScrap> scrapPageList = postScrapRepository.findAllByMemberAndScrapStatusTrueOrderByPostScrapIdDesc(member, pageable);

Expand All @@ -398,7 +398,7 @@ public Page<GetProjectRes> getMyScrapProject(Member member, Pageable page){

@Transactional
public Page<GetContestRes> getMyScrapContest(Member member, Pageable page){
Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by(Sort.Direction.DESC, "created_at"));
Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by("createdAt").descending());

Page<PostScrap> scrapPageList = postScrapRepository.findAllByMemberAndScrapStatusTrueOrderByPostScrapIdDesc(member, pageable);

Expand All @@ -422,4 +422,9 @@ public Page<GetContestRes> getMyScrapContest(Member member, Pageable page){
// 필터링된 리스트를 페이지로 반환
return new PageImpl<>(filteredContests, pageable, scrapPageList.getTotalElements());
}

// @Transactional
// public ? completePost() {
//
// }
}

0 comments on commit e0fa7c2

Please sign in to comment.