Browse Source

add route

tags/v1.21.12.1
lewis 3 years ago
parent
commit
4ea524bc06
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      routers/repo/view.go
  2. +1
    -0
      routers/routes/routes.go

+ 4
- 0
routers/repo/view.go View File

@@ -917,6 +917,10 @@ func Forks(ctx *context.Context) {
}

func Contributors(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplContributors)
}

func ContributorsAPI(ctx *context.Context) {
count := 0
errorCode := 0
errorMsg := ""


+ 1
- 0
routers/routes/routes.go View File

@@ -795,6 +795,7 @@ func RegisterRoutes(m *macaron.Macaron) {
// Grouping for those endpoints not requiring authentication
m.Group("/:username/:reponame", func() {
m.Get("/contributors", repo.Contributors)
m.Get("/contributors/", repo.ContributorsAPI)
m.Group("/milestone", func() {
m.Get("/:id", repo.MilestoneIssuesAndPulls)
}, reqRepoIssuesOrPullsReader, context.RepoRef())


Loading…
Cancel
Save