22 lines
440 B
Go
Raw Normal View History

2017-06-30 23:16:25 +00:00
package explore
2017-06-20 20:54:45 +00:00
import (
"github.com/aerogo/aero"
2017-06-23 22:12:05 +00:00
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
2017-06-20 20:54:45 +00:00
)
2017-07-01 00:14:14 +00:00
// Get ...
2017-06-20 20:54:45 +00:00
func Get(ctx *aero.Context) string {
2017-07-01 00:14:14 +00:00
var cache arn.ListOfIDs
err := arn.DB.GetObject("Cache", "airing anime", &cache)
airing, err := arn.GetAiringAnimeCached()
2017-06-23 22:12:05 +00:00
if err != nil {
2017-07-01 00:14:14 +00:00
return ctx.Error(500, "Couldn't fetch airing anime", err)
2017-06-23 22:12:05 +00:00
}
2017-07-01 00:14:14 +00:00
return ctx.HTML(components.Airing(airing))
2017-06-20 20:54:45 +00:00
}