Refactor page routes into multiple submodules
This commit is contained in:
23
pages/index/forumroutes/forumroutes.go
Normal file
23
pages/index/forumroutes/forumroutes.go
Normal file
@ -0,0 +1,23 @@
|
||||
package forumroutes
|
||||
|
||||
import (
|
||||
"github.com/aerogo/layout"
|
||||
"github.com/animenotifier/notify.moe/pages/forum"
|
||||
"github.com/animenotifier/notify.moe/pages/newthread"
|
||||
"github.com/animenotifier/notify.moe/pages/post"
|
||||
"github.com/animenotifier/notify.moe/pages/thread"
|
||||
)
|
||||
|
||||
// Register registers the page routes.
|
||||
func Register(l *layout.Layout) {
|
||||
// Forum
|
||||
l.Page("/forum", forum.Get)
|
||||
l.Page("/forum/:tag", forum.Get)
|
||||
|
||||
// Thread
|
||||
l.Page("/thread/:id", thread.Get)
|
||||
l.Page("/new/thread", newthread.Get)
|
||||
|
||||
// Post
|
||||
l.Page("/post/:id", post.Get)
|
||||
}
|
Reference in New Issue
Block a user