From e2cbb1fa11c1dcbe0a1afdcd3e283c73d12fc2d8 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 29 Oct 2024 13:21:50 +0100 Subject: [PATCH] more --- routers/web/repo/view.go | 2 +- routers/web/web.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 95db323f5c..106ce35221 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -796,7 +796,7 @@ func HomeWithFeedCheck(ctx *context.Context) { ctx.Redirect(ctx.Repo.RepoLink+defaultURI, http.StatusMovedPermanently) } -// CodeHome render repository home page +// CodeHome render repository code unit page func CodeHome(ctx *context.Context) { checkHomeCodeViewable(ctx) if ctx.Written() { diff --git a/routers/web/web.go b/routers/web/web.go index a0c47fc709..8f211d6b60 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1581,10 +1581,10 @@ func registerRoutes(m *web.Router) { m.Get("/atom/branch/*", context.RepoRefByType(context.RepoRefBranch), feedEnabled, feed.RenderBranchFeed) m.Group("/src", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home) - m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) // "/*" route is deprecated, and kept for backward compatibility + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CodeHome) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CodeHome) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.CodeHome) + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.CodeHome) // "/*" route is deprecated, and kept for backward compatibility }, repo.SetEditorconfigIfExists) m.Get("/forks", context.RepoRef(), repo.Forks)