Minor change

This commit is contained in:
Eduard Urbach 2019-09-01 09:56:40 +09:00
parent 4b09e909a5
commit c1695593d3
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -3,7 +3,6 @@ package soundtrack
import (
"net/http"
"github.com/animenotifier/notify.moe/assets"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/middleware"
"github.com/animenotifier/notify.moe/utils"
@ -24,18 +23,6 @@ func Edit(ctx aero.Context) error {
}
customCtx := ctx.(*middleware.OpenGraphContext)
customCtx.OpenGraph = &arn.OpenGraph{
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")
}
customCtx.OpenGraph = getOpenGraph(track)
return ctx.HTML(components.SoundTrackTabs(track, user) + editform.Render(track, "Edit soundtrack", user))
}