Improved editor log and anime page headers are linkable

This commit is contained in:
2018-04-09 18:17:21 +02:00
parent 719c04f3d5
commit f3fd2d9619
13 changed files with 187 additions and 87 deletions

@ -3,6 +3,8 @@ package anime
import (
"net/http"
"github.com/animenotifier/notify.moe/utils"
"github.com/animenotifier/notify.moe/components"
"github.com/aerogo/aero"
@ -12,11 +14,12 @@ import (
// Characters ...
func Characters(ctx *aero.Context) string {
id := ctx.Get("id")
user := utils.GetUser(ctx)
anime, err := arn.GetAnime(id)
if err != nil {
return ctx.Error(http.StatusNotFound, "Anime not found", err)
}
return ctx.HTML(components.AnimeCharacters(anime))
return ctx.HTML(components.AnimeCharacters(anime, user, true))
}