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

24
pages/anime/relations.go Normal file
View File

@ -0,0 +1,24 @@
package anime
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
)
// Relations ...
func Relations(ctx *aero.Context) string {
user := utils.GetUser(ctx)
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.AnimeRelations(anime, user, true))
}