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{
|
||||
SignInRequired: setting.Service.RequireSignInView,
|
||||
}))
|
||||
|
||||
reqRepoCodeReader := context.RequireRepoReader(models.UnitTypeCode)
|
||||
m.Group("", func() {
|
||||
// Miscellaneous
|
||||
if setting.API.EnableSwagger {
|
||||
|
@ -757,8 +757,8 @@ func Routes() *web.Route {
|
|||
m.Get("/files", context.RepoRef(), repo.GetPullFiles)
|
||||
m.Get("/issues", context.RepoRef(), repo.GetPullIssues)
|
||||
})
|
||||
// m.Get("/compare/*", context.RepoAssignment(), repo.MustBeNotEmpty, reqRepoCodeReader,
|
||||
// repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff)
|
||||
m.Get("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader,
|
||||
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)
|
||||
//end by coder
|
||||
|
|
Loading…
Reference in New Issue