Minor changes

This commit is contained in:
Eduard Urbach 2017-06-04 01:17:00 +02:00
parent 13c87d65d8
commit dac19952db
5 changed files with 11 additions and 3 deletions

2
api.go
View File

@ -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 {

View File

@ -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

View File

@ -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)

View File

@ -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 {

View File

@ -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)