fix usercomments
This commit is contained in:
parent
7e0c292d7c
commit
06e402a8f2
@ -105,10 +105,8 @@ public class CommentManager {
|
||||
public Page<Comment> fetchByUsername(String username, Long orElse, Instant date, int page,
|
||||
int size, boolean asc) {
|
||||
Sort sort = Sort.by(asc ? Order.asc("created") : Order.desc("created"));
|
||||
return commentRepository
|
||||
.findAll(
|
||||
qComment.author.equalsIgnoreCase(username).and(qComment.parent.isNull())
|
||||
.and(qComment.created.before(date)),
|
||||
return commentRepository.findAll(
|
||||
qComment.author.equalsIgnoreCase(username).and(qComment.created.before(date)),
|
||||
PageRequest.of(page, size, sort));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user