1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

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
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