mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Refactor Milestone related (#11225)
This commit is contained in:
parent
ba40263fdd
commit
7257c39ddf
7 changed files with 316 additions and 320 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue