mirror of https://github.com/jlelse/GoBlog
Fix webmention router
This commit is contained in:
parent
88f26ef3c6
commit
869b505a39
|
@ -52,19 +52,21 @@ func (a *goBlog) activityPubRouter(r chi.Router) {
|
||||||
|
|
||||||
// Webmentions
|
// Webmentions
|
||||||
func (a *goBlog) webmentionsRouter(r chi.Router) {
|
func (a *goBlog) webmentionsRouter(r chi.Router) {
|
||||||
if wm := a.cfg.Webmention; wm != nil && !wm.DisableReceiving {
|
if wm := a.cfg.Webmention; wm != nil && wm.DisableReceiving {
|
||||||
// Endpoint
|
// Disabled
|
||||||
r.Post("/", a.handleWebmention)
|
return
|
||||||
// Authenticated routes
|
|
||||||
r.Group(func(r chi.Router) {
|
|
||||||
r.Use(a.authMiddleware)
|
|
||||||
r.Get("/", a.webmentionAdmin)
|
|
||||||
r.Get(paginationPath, a.webmentionAdmin)
|
|
||||||
r.Post("/delete", a.webmentionAdminDelete)
|
|
||||||
r.Post("/approve", a.webmentionAdminApprove)
|
|
||||||
r.Post("/reverify", a.webmentionAdminReverify)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
// Endpoint
|
||||||
|
r.Post("/", a.handleWebmention)
|
||||||
|
// Authenticated routes
|
||||||
|
r.Group(func(r chi.Router) {
|
||||||
|
r.Use(a.authMiddleware)
|
||||||
|
r.Get("/", a.webmentionAdmin)
|
||||||
|
r.Get(paginationPath, a.webmentionAdmin)
|
||||||
|
r.Post("/delete", a.webmentionAdminDelete)
|
||||||
|
r.Post("/approve", a.webmentionAdminApprove)
|
||||||
|
r.Post("/reverify", a.webmentionAdminReverify)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
|
|
Loading…
Reference in New Issue