summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r--routers/web/repo/repo.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index 98f60c6b59..46a80524ed 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -13,6 +13,7 @@ import (
"time"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/graceful"
@@ -342,7 +343,7 @@ func RedirectDownload(ctx *context.Context) {
)
tagNames := []string{vTag}
curRepo := ctx.Repo.Repository
- releases, err := models.GetReleasesByRepoIDAndNames(models.DefaultDBContext(), curRepo.ID, tagNames)
+ releases, err := models.GetReleasesByRepoIDAndNames(db.DefaultContext(), curRepo.ID, tagNames)
if err != nil {
if models.IsErrAttachmentNotExist(err) {
ctx.Error(http.StatusNotFound)
@@ -379,7 +380,7 @@ func Download(ctx *context.Context) {
return
}
- archiver, err := models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
+ archiver, err := models.GetRepoArchiver(db.DefaultContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
if err != nil {
ctx.ServerError("models.GetRepoArchiver", err)
return
@@ -409,7 +410,7 @@ func Download(ctx *context.Context) {
return
}
times++
- archiver, err = models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
+ archiver, err = models.GetRepoArchiver(db.DefaultContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
if err != nil {
ctx.ServerError("archiver_service.StartArchive", err)
return
@@ -465,7 +466,7 @@ func InitiateDownload(ctx *context.Context) {
return
}
- archiver, err := models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
+ archiver, err := models.GetRepoArchiver(db.DefaultContext(), aReq.RepoID, aReq.Type, aReq.CommitID)
if err != nil {
ctx.ServerError("archiver_service.StartArchive", err)
return