Use new character structure
This commit is contained in:
@ -29,7 +29,7 @@ func Edit(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
if quote.Character() != nil {
|
||||
ctx.Data.(*arn.OpenGraph).Tags["og:image"] = quote.Character().Image
|
||||
ctx.Data.(*arn.OpenGraph).Tags["og:image"] = quote.Character().ImageLink("large")
|
||||
}
|
||||
|
||||
return ctx.HTML(components.QuoteTabs(quote, user) + editform.Render(quote, "Edit quote", user))
|
||||
|
@ -32,8 +32,8 @@ func Get(ctx *aero.Context) string {
|
||||
character, _ := arn.GetCharacter(quote.CharacterID)
|
||||
|
||||
if character != nil {
|
||||
openGraph.Tags["og:title"] = character.Name + "'s quote"
|
||||
openGraph.Tags["og:image"] = "https:" + character.Image
|
||||
openGraph.Tags["og:title"] = character.Name.Canonical + "'s quote"
|
||||
openGraph.Tags["og:image"] = "https:" + character.ImageLink("large")
|
||||
}
|
||||
|
||||
ctx.Data = openGraph
|
||||
|
Reference in New Issue
Block a user