Set content type of api requests to application/json

This commit is contained in:
Jannis Mattheis 2018-02-11 22:40:39 +01:00 committed by Jannis Mattheis
parent c20e999b70
commit 4bb6950e34
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,10 @@ func Create(db *database.GormDatabase) (*gin.Engine, func()) {
g.GET("/")
g.Use(func(ctx *gin.Context) {
ctx.Header("Content-Type", "application/json")
})
g.Group("/").Use(authentication.RequireApplicationToken()).POST("/message", messageHandler.CreateMessage)
clientAuth := g.Group("")