add Content-Type: json to peppy methods

This commit is contained in:
Morgan Bazalgette 2017-09-03 14:35:23 +02:00
parent 73f4a888c5
commit 77093ebef7

View File

@ -10,6 +10,8 @@ func PeppyMethod(a func(c *fasthttp.RequestCtx, db *sqlx.DB)) fasthttp.RequestHa
return func(c *fasthttp.RequestCtx) { return func(c *fasthttp.RequestCtx) {
doggo.Incr("requests.peppy", nil, 1) doggo.Incr("requests.peppy", nil, 1)
c.Response.Header.Add("Content-Type", "application/json; charset=utf-8")
// I have no idea how, but I manged to accidentally string the first 4 // I have no idea how, but I manged to accidentally string the first 4
// letters of the alphabet into a single function call. // letters of the alphabet into a single function call.
a(c, db) a(c, db)