Pass test

This commit is contained in:
Eduard Urbach 2017-10-02 02:09:05 +02:00
parent 083ef64746
commit 4e5472260d
3 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,8 @@ import (
"github.com/animenotifier/notify.moe/components/js"
)
func init() {
// configureAssets adds all the routes used for media assets.
func configureAssets(app *aero.Application) {
// Script bundle
scriptBundle := js.Bundle()

View File

@ -153,8 +153,11 @@ func configure(app *aero.Application) *aero.Application {
app.Ajax("/paypal/cancel", paypal.Cancel)
app.Get("/api/paypal/payment/create", paypal.CreatePayment)
// Assets
configureAssets(app)
// Rewrite
app.Rewrite(Rewrite)
app.Rewrite(rewrite)
// Middleware
app.Use(middleware.Firewall())

View File

@ -6,8 +6,8 @@ import (
"github.com/aerogo/aero"
)
// Rewrite will rewrite certain routes
func Rewrite(ctx *aero.RewriteContext) {
// rewrite will rewrite certain routes
func rewrite(ctx *aero.RewriteContext) {
requestURI := ctx.URI()
// User profiles