20 lines
339 B
Go
Raw Normal View History

2016-11-19 14:54:31 +00:00
package genre
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
genreName := ctx.Get("name")
2016-11-19 19:53:33 +00:00
genre, err := arn.GetGenre(genreName)
2016-11-19 14:54:31 +00:00
if err != nil {
return err.Error()
}
2016-11-19 20:04:33 +00:00
return ctx.HTML(components.Genre(genre))
2016-11-19 14:54:31 +00:00
}