Skip to content

Commit

Permalink
Fix 404 for new/upload file
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantkoenig committed Jun 2, 2017
1 parent fb81509 commit 120d293
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions routers/routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,25 +472,26 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Post("/milestone", repo.UpdateIssueMilestone, reqRepoWriter)
m.Post("/assignee", repo.UpdateIssueAssignee, reqRepoWriter)
m.Post("/status", repo.UpdateIssueStatus, reqRepoWriter)
})
}, context.CheckUnit(models.UnitTypeIssues))
m.Group("/comments/:id", func() {
m.Post("", repo.UpdateCommentContent)
m.Post("/delete", repo.DeleteComment)
})
}, context.CheckUnit(models.UnitTypeIssues))
m.Group("/labels", func() {
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
m.Post("/delete", repo.DeleteLabel)
m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels)
}, reqRepoWriter, context.RepoRef())
}, reqRepoWriter, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues))
m.Group("/milestones", func() {
m.Combo("/new").Get(repo.NewMilestone).
Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
m.Get("/:id/edit", repo.EditMilestone)
m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost)
m.Get("/:id/:action", repo.ChangeMilestonStatus)
m.Post("/delete", repo.DeleteMilestone)
}, reqRepoWriter, context.RepoRef())
}, reqRepoWriter, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues))


m.Combo("/compare/*", repo.MustAllowPulls, repo.SetEditorconfigIfExists).
Get(repo.CompareAndPullRequest).
Expand Down Expand Up @@ -522,7 +523,7 @@ func RegisterRoutes(m *macaron.Macaron) {
return
}
})
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits(), context.CheckUnit(models.UnitTypeIssues))
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits())

// Releases
m.Group("/:username/:reponame", func() {
Expand Down

0 comments on commit 120d293

Please sign in to comment.