diff options
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go index bf027958b7..a39da572ef 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -497,6 +497,20 @@ func runWeb(ctx *cli.Context) error { m.Combo("/compare/*", repo.MustAllowPulls).Get(repo.CompareAndPullRequest). Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) + + m.Group("", func() { + m.Combo("/_edit/*").Get(repo.EditFile). + Post(bindIgnErr(auth.EditRepoFileForm{}), repo.EditFilePost) + m.Combo("/_new/*").Get(repo.NewFile). + Post(bindIgnErr(auth.EditRepoFileForm{}), repo.NewFilePost) + m.Post("/preview/*", bindIgnErr(auth.EditPreviewDiffForm{}), repo.DiffPreviewPost) + m.Combo("/upload/*").Get(repo.UploadFile). + Post(bindIgnErr(auth.UploadRepoFileForm{}), repo.UploadFilePost) + m.Post("/delete/*", bindIgnErr(auth.DeleteRepoFileForm{}), repo.DeleteFilePost) + m.Post("/branches", bindIgnErr(auth.NewBranchForm{}), repo.NewBranchPost) + m.Post("/upload-file", repo.UploadFileToServer) + m.Post("/upload-remove", bindIgnErr(auth.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer) + }, context.RepoRef(), context.RepoAssignment(), reqRepoWriter) }, reqSignIn, context.RepoAssignment(), repo.MustBeNotBare) m.Group("/:username/:reponame", func() { |