Shop improvements
This commit is contained in:
@ -1,21 +1,15 @@
|
||||
package shop
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
var proAccount = ""
|
||||
|
||||
func init() {
|
||||
data, _ := ioutil.ReadFile("pages/shop/pro-account.md")
|
||||
proAccount = string(data)
|
||||
}
|
||||
|
||||
// Get shop page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
@ -24,5 +18,7 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", nil)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Shop(user, proAccount))
|
||||
items := arn.AllItems()
|
||||
|
||||
return ctx.HTML(components.Shop(user, items))
|
||||
}
|
||||
|
Reference in New Issue
Block a user