diff --git a/server/handlers/token.go b/server/handlers/token.go index 97bce00..da72969 100644 --- a/server/handlers/token.go +++ b/server/handlers/token.go @@ -22,7 +22,7 @@ import ( func TokenHandler() gin.HandlerFunc { return func(gc *gin.Context) { var reqBody map[string]string - if err := gc.Bind(&reqBody); err != nil { + if err := gc.BindJSON(&reqBody); err != nil { log.Debug("Error binding JSON: ", err) gc.JSON(http.StatusBadRequest, gin.H{ "error": "error_binding_json",