Added anime tabs

This commit is contained in:
2017-10-20 16:52:07 +02:00
parent d50ba892e6
commit 02e89cd5e2
10 changed files with 142 additions and 61 deletions

23
pages/anime/episodes.go Normal file
View File

@ -0,0 +1,23 @@
package anime
import (
"net/http"
"github.com/animenotifier/notify.moe/components"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
)
// Episodes ...
func Episodes(ctx *aero.Context) string {
id := ctx.Get("id")
anime, err := arn.GetAnime(id)
if err != nil {
return ctx.Error(http.StatusNotFound, "Anime not found", err)
}
return ctx.HTML(components.AnimeEpisodes(anime))
}