Upgraded to latest aero version
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user