mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-02 15:09:33 -05:00
more
This commit is contained in:
parent
7449a248d1
commit
e2cbb1fa11
@ -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() {
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user