Applied new layout system

This commit is contained in:
2019-06-03 12:20:17 +09:00
parent 36427a1501
commit 3268488b7b
26 changed files with 346 additions and 308 deletions

View File

@ -2,26 +2,26 @@ package shoproutes
import (
"github.com/aerogo/aero"
"github.com/aerogo/layout"
"github.com/animenotifier/notify.moe/pages/charge"
"github.com/animenotifier/notify.moe/pages/inventory"
"github.com/animenotifier/notify.moe/pages/paypal"
"github.com/animenotifier/notify.moe/pages/shop"
"github.com/animenotifier/notify.moe/pages/support"
"github.com/animenotifier/notify.moe/utils/page"
)
// Register registers the page routes.
func Register(l *layout.Layout, app *aero.Application) {
func Register(app *aero.Application) {
// Shop
l.Page("/support", support.Get)
l.Page("/shop", shop.Get)
l.Page("/inventory", inventory.Get)
l.Page("/charge", charge.Get)
l.Page("/shop/history", shop.PurchaseHistory)
page.Get(app, "/support", support.Get)
page.Get(app, "/shop", shop.Get)
page.Get(app, "/inventory", inventory.Get)
page.Get(app, "/charge", charge.Get)
page.Get(app, "/shop/history", shop.PurchaseHistory)
// PayPal
l.Page("/paypal/success", paypal.Success)
l.Page("/paypal/cancel", paypal.Cancel)
page.Get(app, "/paypal/success", paypal.Success)
page.Get(app, "/paypal/cancel", paypal.Cancel)
// API: Create payment
app.Post("/api/paypal/payment/create", paypal.CreatePayment)