mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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"
|
||||
)
|
||||
|
||||
// GetTree get the tree of a repository.
|
||||
@@ -60,7 +60,7 @@ func GetTree(ctx *context.APIContext) {
|
||||
ctx.Error(http.StatusBadRequest, "", "sha not provided")
|
||||
return
|
||||
}
|
||||
if tree, err := repofiles.GetTreeBySHA(ctx.Repo.Repository, sha, ctx.FormInt("page"), ctx.FormInt("per_page"), ctx.FormBool("recursive")); err != nil {
|
||||
if tree, err := files_service.GetTreeBySHA(ctx.Repo.Repository, sha, ctx.FormInt("page"), ctx.FormInt("per_page"), ctx.FormBool("recursive")); err != nil {
|
||||
ctx.Error(http.StatusBadRequest, "", err.Error())
|
||||
} else {
|
||||
ctx.JSON(http.StatusOK, tree)
|
||||
|
Reference in New Issue
Block a user