From 4ce3369f8faedf8cf80dd5dc58214d3e2fc82c8b Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 4 Nov 2016 23:03:13 +0900 Subject: [PATCH] Update to latest aero --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 67a7695d..13b0f393 100644 --- a/main.go +++ b/main.go @@ -44,7 +44,7 @@ func main() { } app.Register("/genres/:name", func(ctx *aero.Context) string { - genreName := ctx.Params.ByName("name") + genreName := ctx.Get("name") genreInfo := new(GenreInfo) err := arn.GetObject("Genres", genreName, genreInfo) @@ -70,7 +70,7 @@ func main() { }) app.Register("/anime/:id", func(ctx *aero.Context) string { - id, _ := strconv.Atoi(ctx.Params.ByName("id")) + id, _ := strconv.Atoi(ctx.Get("id")) anime, err := arn.GetAnime(id) if err != nil { @@ -105,7 +105,7 @@ func main() { }) app.Get("/api/anime/:id", func(ctx *aero.Context) string { - id, _ := strconv.Atoi(ctx.Params.ByName("id")) + id, _ := strconv.Atoi(ctx.Get("id")) anime, err := arn.GetAnime(id) if err != nil { @@ -116,7 +116,7 @@ func main() { }) app.Get("/api/users/:nick", func(ctx *aero.Context) string { - nick := ctx.Params.ByName("nick") + nick := ctx.Get("nick") user, err := arn.GetUserByNick(nick) if err != nil {