2016-05-15 11:57:04 +00:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
2016-08-15 11:45:42 +00:00
|
|
|
"github.com/jmoiron/sqlx"
|
2017-02-02 12:40:28 +00:00
|
|
|
"github.com/valyala/fasthttp"
|
2016-05-15 11:57:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// PeppyMethod generates a method for the peppyapi
|
2017-02-02 12:40:28 +00:00
|
|
|
func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHandler {
|
|
|
|
return func(c *fasthttp.RequestCtx) {
|
2016-10-02 19:59:04 +00:00
|
|
|
doggo.Incr("requests.peppy", nil, 1)
|
2016-10-02 18:07:38 +00:00
|
|
|
|
2016-05-15 11:57:04 +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)
|
|
|
|
}
|
|
|
|
}
|