Skip to content

Commit c42b718

Browse files
authored
Fix branch list auth (#26041)
The public repositories' branch list dropdown will return wrong because it requires login wrongly. Caused by #25719
1 parent a7e8273 commit c42b718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/web.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,6 @@ func registerRoutes(m *web.Route) {
10911091
}, context.RepoRef(), canEnableEditor, context.RepoMustNotBeArchived())
10921092

10931093
m.Group("/branches", func() {
1094-
m.Get("/list", repo.GetBranchesList)
10951094
m.Group("/_new", func() {
10961095
m.Post("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CreateBranch)
10971096
m.Post("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CreateBranch)
@@ -1248,6 +1247,7 @@ func registerRoutes(m *web.Route) {
12481247
}, repo.MustBeNotEmpty, dlSourceEnabled, reqRepoCodeReader)
12491248

12501249
m.Group("/branches", func() {
1250+
m.Get("/list", repo.GetBranchesList)
12511251
m.Get("", repo.Branches)
12521252
}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader)
12531253

0 commit comments

Comments
 (0)