mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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>
This commit is contained in:
@@ -379,7 +379,10 @@ func RedirectDownload(ctx *context.Context) {
|
||||
)
|
||||
tagNames := []string{vTag}
|
||||
curRepo := ctx.Repo.Repository
|
||||
releases, err := repo_model.GetReleasesByRepoIDAndNames(ctx, curRepo.ID, tagNames)
|
||||
releases, err := db.Find[repo_model.Release](ctx, repo_model.FindReleasesOptions{
|
||||
RepoID: curRepo.ID,
|
||||
TagNames: tagNames,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("RedirectDownload", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user