summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-01-15 10:19:25 +0800
committerGitHub <noreply@github.com>2024-01-15 02:19:25 +0000
commit70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72 (patch)
tree5c9f049437c1a84a402aeef3be0cb4b95dea667e /cmd
parente5313248a8ed967a915f072d3991b6d046badf02 (diff)
downloadgitea-70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72.tar.gz
gitea-70c4aad8e1cbc46b049b015dcd6f2e5be5a69e72.zip
Move more functions to db.Find (#28419)
Following #28220 This PR move more functions to use `db.Find`. --------- Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/admin.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index b5903cd4fd..74bfa5a6c6 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -157,10 +157,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
}
func getReleaseCount(ctx context.Context, id int64) (int64, error) {
- return repo_model.GetReleaseCountByRepoID(
+ return db.Count[repo_model.Release](
ctx,
- id,
repo_model.FindReleasesOptions{
+ RepoID: id,
IncludeTags: true,
},
)