Minor changes
This commit is contained in:
parent
13c87d65d8
commit
dac19952db
2
api.go
2
api.go
@ -21,7 +21,7 @@ func init() {
|
|||||||
// })
|
// })
|
||||||
|
|
||||||
app.Get("/api/anime/:id", func(ctx *aero.Context) string {
|
app.Get("/api/anime/:id", func(ctx *aero.Context) string {
|
||||||
id, _ := ctx.GetInt("id")
|
id := ctx.Get("id")
|
||||||
anime, err := arn.GetAnime(id)
|
anime, err := arn.GetAnime(id)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -3,6 +3,7 @@ component Layout(content string)
|
|||||||
head
|
head
|
||||||
title notify.moe - Beta
|
title notify.moe - Beta
|
||||||
meta(name="viewport", content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes")
|
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
|
body
|
||||||
#container
|
#container
|
||||||
#header
|
#header
|
||||||
|
7
main.go
7
main.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
@ -51,6 +52,12 @@ func main() {
|
|||||||
return ctx.JSON(app.Config.Manifest)
|
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
|
||||||
scripts, _ := ioutil.ReadFile("temp/scripts.js")
|
scripts, _ := ioutil.ReadFile("temp/scripts.js")
|
||||||
js := string(scripts)
|
js := string(scripts)
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// Get ...
|
// Get ...
|
||||||
func Get(ctx *aero.Context) string {
|
func Get(ctx *aero.Context) string {
|
||||||
id, _ := ctx.GetInt("id")
|
id := ctx.Get("id")
|
||||||
anime, err := arn.GetAnime(id)
|
anime, err := arn.GetAnime(id)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
component Profile(viewUser *arn.User, user *arn.User)
|
component Profile(viewUser *arn.User, user *arn.User)
|
||||||
.profile
|
.profile
|
||||||
.profile-cover(style=viewUser.CoverImageStyle())
|
//- .profile-cover(style=viewUser.CoverImageStyle())
|
||||||
|
|
||||||
.image-container
|
.image-container
|
||||||
ProfileImage(viewUser)
|
ProfileImage(viewUser)
|
||||||
|
Loading…
Reference in New Issue
Block a user