forked from Gitlink/gitea-1156
Merge pull request 'Add:/compare/*' (#35) from wonderful/gitea-1156:develop into develop
This commit is contained in:
commit
5de0fa2f7c
|
@ -583,7 +583,7 @@ func Routes() *web.Route {
|
||||||
m.Use(context.ToggleAPI(&context.ToggleOptions{
|
m.Use(context.ToggleAPI(&context.ToggleOptions{
|
||||||
SignInRequired: setting.Service.RequireSignInView,
|
SignInRequired: setting.Service.RequireSignInView,
|
||||||
}))
|
}))
|
||||||
|
reqRepoCodeReader := context.RequireRepoReader(models.UnitTypeCode)
|
||||||
m.Group("", func() {
|
m.Group("", func() {
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
if setting.API.EnableSwagger {
|
if setting.API.EnableSwagger {
|
||||||
|
@ -757,8 +757,8 @@ func Routes() *web.Route {
|
||||||
m.Get("/files", context.RepoRef(), repo.GetPullFiles)
|
m.Get("/files", context.RepoRef(), repo.GetPullFiles)
|
||||||
m.Get("/issues", context.RepoRef(), repo.GetPullIssues)
|
m.Get("/issues", context.RepoRef(), repo.GetPullIssues)
|
||||||
})
|
})
|
||||||
// m.Get("/compare/*", context.RepoAssignment(), repo.MustBeNotEmpty, reqRepoCodeReader,
|
m.Get("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader,
|
||||||
// repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff)
|
repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff)
|
||||||
// m.Get("/src/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.GetFileContents)
|
// m.Get("/src/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.GetFileContents)
|
||||||
m.Get("/src/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.GetFileContents)
|
m.Get("/src/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.GetFileContents)
|
||||||
//end by coder
|
//end by coder
|
||||||
|
|
Loading…
Reference in New Issue