13 lines
323 B
Go
Raw Permalink Normal View History

2019-06-03 03:20:17 +00:00
package page
2019-06-03 05:53:04 +00:00
import (
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/server/middleware"
2019-06-03 05:53:04 +00:00
)
2019-06-03 03:20:17 +00:00
// Get registers a layout rendered route and a contents-only route.
func Get(app *aero.Application, route string, handler aero.Handler) {
2019-06-03 05:53:04 +00:00
app.Get(route, middleware.Layout(handler))
2019-06-03 03:20:17 +00:00
app.Get("/_"+route, handler)
}