Minor change
This commit is contained in:
parent
4b09e909a5
commit
c1695593d3
@ -3,7 +3,6 @@ package soundtrack
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/animenotifier/notify.moe/assets"
|
|
||||||
"github.com/animenotifier/notify.moe/components"
|
"github.com/animenotifier/notify.moe/components"
|
||||||
"github.com/animenotifier/notify.moe/middleware"
|
"github.com/animenotifier/notify.moe/middleware"
|
||||||
"github.com/animenotifier/notify.moe/utils"
|
"github.com/animenotifier/notify.moe/utils"
|
||||||
@ -24,18 +23,6 @@ func Edit(ctx aero.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
customCtx := ctx.(*middleware.OpenGraphContext)
|
customCtx := ctx.(*middleware.OpenGraphContext)
|
||||||
customCtx.OpenGraph = &arn.OpenGraph{
|
customCtx.OpenGraph = getOpenGraph(track)
|
||||||
Tags: map[string]string{
|
|
||||||
"og:title": track.Title.ByUser(user),
|
|
||||||
"og:url": "https://" + assets.Domain + track.Link(),
|
|
||||||
"og:site_name": "notify.moe",
|
|
||||||
"og:type": "music.song",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if track.MainAnime() != nil {
|
|
||||||
customCtx.OpenGraph.Tags["og:image"] = track.MainAnime().ImageLink("large")
|
|
||||||
}
|
|
||||||
|
|
||||||
return ctx.HTML(components.SoundTrackTabs(track, user) + editform.Render(track, "Edit soundtrack", user))
|
return ctx.HTML(components.SoundTrackTabs(track, user) + editform.Render(track, "Edit soundtrack", user))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user