diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-24 15:56:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 15:56:24 +0800 |
commit | c97d66d23cf14e88514cccb88c393d21db51ab7a (patch) | |
tree | 625857bea77befb61847c01bf17aac1177255787 /routers/api/v1/repo/blob.go | |
parent | 754fdd8f9c2b1e4e78d507fd414968334cf586fd (diff) | |
download | gitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.tar.gz gitea-c97d66d23cf14e88514cccb88c393d21db51ab7a.zip |
Move repofiles from modules/repofiles to services/repository/files (#17774)
* Move repofiles from modules to services
* rename services/repository/repofiles -> services/repository/files
* Fix test
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers/api/v1/repo/blob.go')
-rw-r--r-- | routers/api/v1/repo/blob.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/blob.go b/routers/api/v1/repo/blob.go index 3918a49d51..e3ce0e1916 100644 --- a/routers/api/v1/repo/blob.go +++ b/routers/api/v1/repo/blob.go @@ -8,7 +8,7 @@ import ( "net/http" "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/repofiles" + files_service "code.gitea.io/gitea/services/repository/files" ) // GetBlob get the blob of a repository file. @@ -45,7 +45,7 @@ func GetBlob(ctx *context.APIContext) { ctx.Error(http.StatusBadRequest, "", "sha not provided") return } - if blob, err := repofiles.GetBlobBySHA(ctx.Repo.Repository, sha); err != nil { + if blob, err := files_service.GetBlobBySHA(ctx.Repo.Repository, sha); err != nil { ctx.Error(http.StatusBadRequest, "", err) } else { ctx.JSON(http.StatusOK, blob) |