summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/file.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
committerUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
commit514382e2ebfe6869268aeb919c1fa4d224687e13 (patch)
tree1aa8c4b3b1e771a5dc6f0bdd74567961570efcaa /routers/api/v1/repo/file.go
parentcb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff)
downloadgitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz
gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip
Rename module: middleware -> context
Diffstat (limited to 'routers/api/v1/repo/file.go')
-rw-r--r--routers/api/v1/repo/file.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index f64e663466..7939a58424 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -8,12 +8,12 @@ import (
"github.com/gogits/git-module"
"github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/middleware"
+ "github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/routers/repo"
)
// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-raw-content
-func GetRawFile(ctx *middleware.Context) {
+func GetRawFile(ctx *context.Context) {
if !ctx.Repo.HasAccess() {
ctx.Error(404)
return
@@ -34,7 +34,7 @@ func GetRawFile(ctx *middleware.Context) {
}
// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-archive
-func GetArchive(ctx *middleware.Context) {
+func GetArchive(ctx *context.Context) {
repoPath := models.RepoPath(ctx.Params(":username"), ctx.Params(":reponame"))
gitRepo, err := git.OpenRepository(repoPath)
if err != nil {