2017-06-17 01:25:02 +02:00

20 lines
358 B
Go

package anime
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get anime page.
func Get(ctx *aero.Context) string {
id := ctx.Get("id")
anime, err := arn.GetAnime(id)
if err != nil {
return ctx.Error(404, "Anime not found", err)
}
return ctx.HTML(components.Anime(anime))
}