mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-15 01:06:19 +01:00
lint, err handle
This commit is contained in:
parent
11a0410bd8
commit
fc40f658da
@ -532,6 +532,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{
|
||||
|
||||
@ -237,7 +237,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")
|
||||
@ -759,7 +758,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