Improved error handling for the discord bot
This commit is contained in:
@ -21,6 +21,6 @@ func Get(ctx aero.Context) error {
|
||||
}
|
||||
|
||||
customCtx := ctx.(*middleware.OpenGraphContext)
|
||||
customCtx.OpenGraph = getOpenGraph(ctx, amv)
|
||||
customCtx.OpenGraph = getOpenGraph(amv)
|
||||
return ctx.HTML(components.AMVPage(amv, user))
|
||||
}
|
||||
|
@ -3,12 +3,11 @@ package amv
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/assets"
|
||||
)
|
||||
|
||||
func getOpenGraph(ctx aero.Context, amv *arn.AMV) *arn.OpenGraph {
|
||||
func getOpenGraph(amv *arn.AMV) *arn.OpenGraph {
|
||||
openGraph := &arn.OpenGraph{
|
||||
Tags: map[string]string{
|
||||
"og:title": amv.Title.ByUser(nil) + " (AMV)",
|
||||
|
Reference in New Issue
Block a user