forked from forgejo/forgejo
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:
parent
754fdd8f9c
commit
c97d66d23c
37 changed files with 277 additions and 353 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue