aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-06-24 05:12:38 +0800
committerGitHub <noreply@github.com>2021-06-23 17:12:38 -0400
commitb223d361955f8b722f7dd0b358b2e57e6f359edf (patch)
treecaa934320b264b969df679508eb19458e0cc6029 /routers/api/v1/repo
parentc9c7afda1a80bda7b61ded222163db796132b78f (diff)
downloadgitea-b223d361955f8b722f7dd0b358b2e57e6f359edf.tar.gz
gitea-b223d361955f8b722f7dd0b358b2e57e6f359edf.zip
Rework repository archive (#14723)
* Use storage to store archive files * Fix backend lint * Add archiver table on database * Finish archive download * Fix test * Add database migrations * Add status for archiver * Fix lint * Add queue * Add doctor to check and delete old archives * Improve archive queue * Fix tests * improve archive storage * Delete repo archives * Add missing fixture * fix fixture * Fix fixture * Fix test * Fix archiver cleaning * Fix bug * Add docs for repository archive storage * remove repo-archive configuration * Fix test * Fix test * Fix lint Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r--routers/api/v1/repo/file.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 39a60df33f..e6427ea4f4 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -18,6 +18,7 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/routers/common"
+ "code.gitea.io/gitea/routers/web/repo"
)
// GetRawFile get a file by path on a repository
@@ -126,7 +127,7 @@ func GetArchive(ctx *context.APIContext) {
ctx.Repo.GitRepo = gitRepo
defer gitRepo.Close()
- common.Download(ctx.Context)
+ repo.Download(ctx.Context)
}
// GetEditorconfig get editor config of a repository