2018-04-25 18:03:35 +00:00
|
|
|
package forumroutes
|
|
|
|
|
|
|
|
import (
|
2019-06-03 03:20:17 +00:00
|
|
|
"github.com/aerogo/aero"
|
2018-04-25 18:03:35 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/forum"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/newthread"
|
|
|
|
"github.com/animenotifier/notify.moe/pages/post"
|
2018-06-02 23:52:38 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/post/editpost"
|
2018-04-25 18:03:35 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/thread"
|
2018-06-02 23:52:38 +00:00
|
|
|
"github.com/animenotifier/notify.moe/pages/thread/editthread"
|
2019-06-03 03:20:17 +00:00
|
|
|
"github.com/animenotifier/notify.moe/utils/page"
|
2018-04-25 18:03:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Register registers the page routes.
|
2019-06-03 03:20:17 +00:00
|
|
|
func Register(app *aero.Application) {
|
2018-04-25 18:03:35 +00:00
|
|
|
// Forum
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/forum", forum.Get)
|
|
|
|
page.Get(app, "/forum/:tag", forum.Get)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// Thread
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/thread/:id", thread.Get)
|
|
|
|
page.Get(app, "/thread/:id/edit", editthread.Get)
|
|
|
|
page.Get(app, "/new/thread", newthread.Get)
|
2018-04-25 18:03:35 +00:00
|
|
|
|
|
|
|
// Post
|
2019-06-03 03:20:17 +00:00
|
|
|
page.Get(app, "/post/:id", post.Get)
|
|
|
|
page.Get(app, "/post/:id/edit", editpost.Get)
|
2018-04-25 18:03:35 +00:00
|
|
|
}
|