We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fedc317 commit 74b858aCopy full SHA for 74b858a
server/handlers/token.go
@@ -22,7 +22,7 @@ import (
22
func TokenHandler() gin.HandlerFunc {
23
return func(gc *gin.Context) {
24
var reqBody map[string]string
25
- if err := gc.Bind(&reqBody); err != nil {
+ if err := gc.BindJSON(&reqBody); err != nil {
26
log.Debug("Error binding JSON: ", err)
27
gc.JSON(http.StatusBadRequest, gin.H{
28
"error": "error_binding_json",
0 commit comments