20 lines
366 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 ctx.Error(404, "Genre not found", err)
2016-11-19 14:54:31 +00:00
}
2016-11-19 20:04:33 +00:00
return ctx.HTML(components.Genre(genre))
2016-11-19 14:54:31 +00:00
}