Skip to content

Commit

Permalink
Merge pull request #169 from pknu-wap/fix/찐찐찐막
Browse files Browse the repository at this point in the history
찐막
  • Loading branch information
Due-IT authored Nov 29, 2023
2 parents 7927896 + 09e8ccb commit f4ab391
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.springframework.web.util.UriComponentsBuilder;

import java.util.*;
import java.util.stream.Collectors;

@Service
public class GitHubService {
Expand Down Expand Up @@ -182,7 +183,11 @@ public PrUnPostResponse saveAndGetPr(List<PrInfo> prInfos, GithubRepository gith
}

List<PrPost> pr = prPostRepository.findByRepo(githubRepository.getId());
PrUnPostedDtos prUnPostedDtos = new PrUnPostedDtos(pr);
List<PrPost> unPostedPr = pr.stream()
.filter(prPost -> prPost.getIsPosted().equals(0))
.collect(Collectors.toList());

PrUnPostedDtos prUnPostedDtos = new PrUnPostedDtos(unPostedPr);
Boolean isAuthor;
if(categoryRepository.findUserByCategoryId(categoryId).getId() == user.getId()){
isAuthor = true;
Expand Down

0 comments on commit f4ab391

Please sign in to comment.