diff --git a/api.go b/api.go index 99b54269..e72f4438 100644 --- a/api.go +++ b/api.go @@ -21,7 +21,7 @@ func init() { // }) app.Get("/api/anime/:id", func(ctx *aero.Context) string { - id, _ := ctx.GetInt("id") + id := ctx.Get("id") anime, err := arn.GetAnime(id) if err != nil { diff --git a/layout/layout.pixy b/layout/layout.pixy index 37855fdb..74d2f6f5 100644 --- a/layout/layout.pixy +++ b/layout/layout.pixy @@ -3,6 +3,7 @@ component Layout(content string) head title notify.moe - Beta meta(name="viewport", content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes") + link(rel="manifest", href="/manifest.json") body #container #header diff --git a/main.go b/main.go index e1da257d..d0e42778 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "io/ioutil" "github.com/aerogo/aero" @@ -51,6 +52,12 @@ func main() { return ctx.JSON(app.Config.Manifest) }) + app.Get("/ip", func(ctx *aero.Context) string { + ip := ctx.RealIP() + fmt.Println(ip) + return ctx.Text(ip) + }) + // Scripts scripts, _ := ioutil.ReadFile("temp/scripts.js") js := string(scripts) diff --git a/pages/anime/anime.go b/pages/anime/anime.go index 0c65cd6f..bcd2c4ec 100644 --- a/pages/anime/anime.go +++ b/pages/anime/anime.go @@ -8,7 +8,7 @@ import ( // Get ... func Get(ctx *aero.Context) string { - id, _ := ctx.GetInt("id") + id := ctx.Get("id") anime, err := arn.GetAnime(id) if err != nil { diff --git a/pages/profile/profile.pixy b/pages/profile/profile.pixy index b899c0ac..24df0b4f 100644 --- a/pages/profile/profile.pixy +++ b/pages/profile/profile.pixy @@ -1,6 +1,6 @@ component Profile(viewUser *arn.User, user *arn.User) .profile - .profile-cover(style=viewUser.CoverImageStyle()) + //- .profile-cover(style=viewUser.CoverImageStyle()) .image-container ProfileImage(viewUser)