1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-02 15:09:33 -05:00
This commit is contained in:
6543 2024-10-29 13:21:50 +01:00
parent 7449a248d1
commit e2cbb1fa11
2 changed files with 5 additions and 5 deletions

View File

@ -796,7 +796,7 @@ func HomeWithFeedCheck(ctx *context.Context) {
ctx.Redirect(ctx.Repo.RepoLink+defaultURI, http.StatusMovedPermanently) ctx.Redirect(ctx.Repo.RepoLink+defaultURI, http.StatusMovedPermanently)
} }
// CodeHome render repository home page // CodeHome render repository code unit page
func CodeHome(ctx *context.Context) { func CodeHome(ctx *context.Context) {
checkHomeCodeViewable(ctx) checkHomeCodeViewable(ctx)
if ctx.Written() { if ctx.Written() {

View File

@ -1581,10 +1581,10 @@ func registerRoutes(m *web.Router) {
m.Get("/atom/branch/*", context.RepoRefByType(context.RepoRefBranch), feedEnabled, feed.RenderBranchFeed) m.Get("/atom/branch/*", context.RepoRefByType(context.RepoRefBranch), feedEnabled, feed.RenderBranchFeed)
m.Group("/src", func() { m.Group("/src", func() {
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home) m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CodeHome)
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home) m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CodeHome)
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home) m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.CodeHome)
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) // "/*" route is deprecated, and kept for backward compatibility m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.CodeHome) // "/*" route is deprecated, and kept for backward compatibility
}, repo.SetEditorconfigIfExists) }, repo.SetEditorconfigIfExists)
m.Get("/forks", context.RepoRef(), repo.Forks) m.Get("/forks", context.RepoRef(), repo.Forks)