From e6c17a67c355580648aa7901065bd1d1bed0f5e0 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sun, 13 Nov 2016 01:45:13 +0900 Subject: [PATCH] Simplified router code --- router.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/router.go b/router.go index b66460f3..79e8a92b 100644 --- a/router.go +++ b/router.go @@ -1,8 +1,6 @@ package main import ( - "strconv" - "github.com/aerogo/aero" "github.com/animenotifier/arn" "github.com/animenotifier/notify.moe/components" @@ -14,7 +12,7 @@ func init() { }) app.Ajax("/anime/:id", func(ctx *aero.Context) string { - id, _ := strconv.Atoi(ctx.Get("id")) + id, _ := ctx.GetInt("id") anime, err := arn.GetAnime(id) if err != nil {