Refactor page routes into multiple submodules

This commit is contained in:
2018-04-25 20:03:35 +02:00
parent d331e15363
commit 2503d63b60
21 changed files with 577 additions and 369 deletions

View 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)
}