Applied new layout system
This commit is contained in:
@ -1,27 +1,28 @@
|
||||
package forumroutes
|
||||
|
||||
import (
|
||||
"github.com/aerogo/layout"
|
||||
"github.com/aerogo/aero"
|
||||
"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/post/editpost"
|
||||
"github.com/animenotifier/notify.moe/pages/thread"
|
||||
"github.com/animenotifier/notify.moe/pages/thread/editthread"
|
||||
"github.com/animenotifier/notify.moe/utils/page"
|
||||
)
|
||||
|
||||
// Register registers the page routes.
|
||||
func Register(l *layout.Layout) {
|
||||
func Register(app *aero.Application) {
|
||||
// Forum
|
||||
l.Page("/forum", forum.Get)
|
||||
l.Page("/forum/:tag", forum.Get)
|
||||
page.Get(app, "/forum", forum.Get)
|
||||
page.Get(app, "/forum/:tag", forum.Get)
|
||||
|
||||
// Thread
|
||||
l.Page("/thread/:id", thread.Get)
|
||||
l.Page("/thread/:id/edit", editthread.Get)
|
||||
l.Page("/new/thread", newthread.Get)
|
||||
page.Get(app, "/thread/:id", thread.Get)
|
||||
page.Get(app, "/thread/:id/edit", editthread.Get)
|
||||
page.Get(app, "/new/thread", newthread.Get)
|
||||
|
||||
// Post
|
||||
l.Page("/post/:id", post.Get)
|
||||
l.Page("/post/:id/edit", editpost.Get)
|
||||
page.Get(app, "/post/:id", post.Get)
|
||||
page.Get(app, "/post/:id/edit", editpost.Get)
|
||||
}
|
||||
|
Reference in New Issue
Block a user