mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
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>
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user