Sort issue comments by commentId
1 parent f106dea commit 6bb664e592621ea1e0f58425401b8f816271a06f
@Naoki Takezoe Naoki Takezoe authored on 21 Jan 2017
Showing 1 changed file
View
2
■■■
src/main/scala/gitbucket/core/service/IssuesService.scala
Issues filter (_.byPrimaryKey(owner, repository, issueId.toInt)) firstOption
else None
 
def getComments(owner: String, repository: String, issueId: Int)(implicit s: Session) =
IssueComments filter (_.byIssue(owner, repository, issueId)) list
IssueComments filter (_.byIssue(owner, repository, issueId)) sortBy(_.commentId asc) list
 
/** @return IssueComment and commentedUser and Issue */
def getCommentsForApi(owner: String, repository: String, issueId: Int)(implicit s: Session): List[(IssueComment, Account, Issue)] =
IssueComments.filter(_.byIssue(owner, repository, issueId))