ripple-api/app/peppy_method.go

18 lines
448 B
Go
Raw Normal View History

package app
import (
"github.com/jmoiron/sqlx"
"github.com/valyala/fasthttp"
)
// PeppyMethod generates a method for the peppyapi
func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHandler {
return func(c *fasthttp.RequestCtx) {
doggo.Incr("requests.peppy", nil, 1)
2016-10-02 18:07:38 +00:00
// I have no idea how, but I manged to accidentally string the first 4
// letters of the alphabet into a single function call.
a(c, db)
}
}