20 lines
351 B
Go
Raw Normal View History

2016-11-19 14:54:31 +00:00
package anime
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
id, _ := ctx.GetInt("id")
anime, err := arn.GetAnime(id)
if err != nil {
2016-11-20 10:26:11 +00:00
return ctx.Error(404, "Anime not found")
2016-11-19 14:54:31 +00:00
}
return ctx.HTML(components.Anime(anime))
}