forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

remove outdated pull-comment routes

comment routes are now grouped under the "round" they operate on

Changed files
+1 -7
appview
-1
appview/state/pull.go
···
},
},
})
-
log.Println(atResp.Uri)
if err != nil {
log.Println("failed to create pull comment", err)
s.pages.Notice(w, "pull-comment", "Failed to create comment.")
+1 -6
appview/state/router.go
···
r.Route("/round/{round}", func(r chi.Router) {
r.Get("/", s.RepoPullPatch)
r.Get("/actions", s.PullActions)
-
r.Route("/comment", func(r chi.Router) {
+
r.With(AuthMiddleware(s)).Route("/comment", func(r chi.Router) {
r.Get("/", s.PullComment)
r.Post("/", s.PullComment)
})
···
r.Get("/", s.RepoPullPatchRaw)
})
-
// authorized requests below this point
r.Group(func(r chi.Router) {
r.Use(AuthMiddleware(s))
r.Route("/resubmit", func(r chi.Router) {
r.Get("/", s.ResubmitPull)
r.Post("/", s.ResubmitPull)
-
})
-
r.Route("/comment", func(r chi.Router) {
-
r.Get("/", s.PullComment)
-
r.Post("/", s.PullComment)
})
r.Post("/close", s.ClosePull)
r.Post("/reopen", s.ReopenPull)