Added anime tabs
This commit is contained in:
22
pages/anime/characters.go
Normal file
22
pages/anime/characters.go
Normal file
@ -0,0 +1,22 @@
|
||||
package anime
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
// Characters ...
|
||||
func Characters(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.AnimeCharacters(anime))
|
||||
}
|
Reference in New Issue
Block a user