20 lines
439 B
Go
Raw Normal View History

2016-11-23 03:44:28 +00:00
package airing
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
airingAnimeCache := new(arn.AiringAnimeCache)
2016-11-23 09:07:02 +00:00
err := arn.GetObject("Cache", "airingAnime", airingAnimeCache)
if err != nil {
return ctx.Error(500, "Couldn't fetch airing anime", err)
}
2016-11-23 05:42:51 +00:00
return ctx.HTML(components.Airing(airingAnimeCache.Anime))
2016-11-23 03:44:28 +00:00
}