fix: tag count error

This commit is contained in:
yystopf 2022-04-07 18:11:42 +08:00
parent d6e2682a08
commit 364a2c1366
1 changed files with 3 additions and 1 deletions

View File

@ -301,7 +301,9 @@ func BranchTagCount(ctx *context.APIContext) {
// "200": // "200":
// "$ref": "#/responses/RepoBranchAndTagCount" // "$ref": "#/responses/RepoBranchAndTagCount"
tagsCount, err := ctx.Repo.GitRepo.GetTagCount() // tags info tagsCount, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{
IncludeTags: true,
})
if err != nil { if err != nil {
ctx.Error(http.StatusInternalServerError, "GetTagCount", err) ctx.Error(http.StatusInternalServerError, "GetTagCount", err)
return return