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 {
|
2017-06-03 23:17:00 +00:00
|
|
|
id := ctx.Get("id")
|
2016-11-19 14:54:31 +00:00
|
|
|
anime, err := arn.GetAnime(id)
|
|
|
|
|
|
|
|
if err != nil {
|
2016-11-23 05:26:59 +00:00
|
|
|
return ctx.Error(404, "Anime not found", err)
|
2016-11-19 14:54:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ctx.HTML(components.Anime(anime))
|
|
|
|
}
|