mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-26 23:21:46 +02:00
lint, err handle
This commit is contained in:
parent
f86ddd53f0
commit
acb57e5031
@ -685,6 +685,7 @@ func CommonRoutes() *web.Router {
|
||||
// https://github.com/opencontainers/distribution-spec/blob/main/spec.md
|
||||
func ContainerRoutes() *web.Router {
|
||||
r := web.NewRouter()
|
||||
|
||||
r.Use(context.PackageContexter())
|
||||
|
||||
verifyAuth(r, []auth.Method{
|
||||
|
@ -235,7 +235,6 @@ func ParseCompareInfo(ctx *context.Context) *common.CompareInfo {
|
||||
if strings.HasSuffix(infoPath, ".diff") {
|
||||
ci.RawDiffType = git.RawDiffNormal
|
||||
infoPath = strings.TrimSuffix(infoPath, ".diff")
|
||||
|
||||
} else if strings.HasSuffix(infoPath, ".patch") {
|
||||
ci.RawDiffType = git.RawDiffPatch
|
||||
infoPath = strings.TrimSuffix(infoPath, ".patch")
|
||||
@ -756,7 +755,11 @@ func CompareDiff(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if ci.RawDiffType != "" {
|
||||
git.GetRepoRawDiffForFile(ci.HeadGitRepo, ci.BaseBranch, ci.HeadBranch, ci.RawDiffType, "", ctx.Resp)
|
||||
err := git.GetRepoRawDiffForFile(ci.HeadGitRepo, ci.BaseBranch, ci.HeadBranch, ci.RawDiffType, "", ctx.Resp)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetRepoRawDiffForFile", err)
|
||||
return
|
||||
}
|
||||
ctx.Resp.Flush()
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user