Simplified router code
This commit is contained in:
parent
f9424a79e4
commit
e6c17a67c3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user