Upgraded to latest aero version

This commit is contained in:
2019-06-01 13:55:49 +09:00
parent ae591e5e7e
commit 28db818c37
196 changed files with 645 additions and 593 deletions

24
middleware/OpenGraph.go Normal file
View File

@ -0,0 +1,24 @@
package middleware
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
)
// OpenGraphContext is a context with open graph data.
type OpenGraphContext struct {
aero.Context
*arn.OpenGraph
}
// OpenGraph middleware modifies the context to be an OpenGraphContext.
func OpenGraph(next aero.Handler) aero.Handler {
return func(ctx aero.Context) error {
ctx = &OpenGraphContext{
Context: ctx,
OpenGraph: nil,
}
return next(ctx)
}
}