Upgraded to latest aero version

This commit is contained in:
2019-06-01 13:55:49 +09:00
parent ae591e5e7e
commit 28db818c37
196 changed files with 645 additions and 593 deletions

View File

@ -6,11 +6,12 @@ import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/middleware"
"github.com/animenotifier/notify.moe/utils"
)
// Lyrics of a soundtrack.
func Lyrics(ctx *aero.Context) string {
func Lyrics(ctx aero.Context) error {
id := ctx.Get("id")
track, err := arn.GetSoundTrack(id)
user := utils.GetUser(ctx)
@ -29,6 +30,7 @@ func Lyrics(ctx *aero.Context) string {
openGraph.Tags["og:description"] = utils.CutLongDescription(track.Lyrics.Romaji)
}
ctx.Data = openGraph
customCtx := ctx.(*middleware.OpenGraphContext)
customCtx.OpenGraph = openGraph
return ctx.HTML(components.SoundTrackLyricsPage(track, user))
}