Refactor Milestone related (#11225)

This commit is contained in:
6543 2020-05-12 23:54:35 +02:00 committed by GitHub
parent ba40263fdd
commit 7257c39ddf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 316 additions and 320 deletions

View file

@ -224,7 +224,7 @@ func Milestones(ctx *context.Context) {
}
}
counts, err := models.CountMilestones(userRepoCond, isShowClosed)
counts, err := models.CountMilestonesByRepoCond(userRepoCond, isShowClosed)
if err != nil {
ctx.ServerError("CountMilestonesByRepoIDs", err)
return
@ -267,7 +267,7 @@ func Milestones(ctx *context.Context) {
i++
}
milestoneStats, err := models.GetMilestonesStats(repoCond)
milestoneStats, err := models.GetMilestonesStatsByRepoCond(repoCond)
if err != nil {
ctx.ServerError("GetMilestoneStats", err)
return
@ -277,7 +277,7 @@ func Milestones(ctx *context.Context) {
if len(repoIDs) == 0 {
totalMilestoneStats = milestoneStats
} else {
totalMilestoneStats, err = models.GetMilestonesStats(userRepoCond)
totalMilestoneStats, err = models.GetMilestonesStatsByRepoCond(userRepoCond)
if err != nil {
ctx.ServerError("GetMilestoneStats", err)
return